/* Define CSS variables for colors and theme properties */
:root {
    --font-family-base: 'Arial', sans-serif;
    --bg-primary: #ffffff;
    --text-primary: #333;
    --header-bg: #2c3e50;
    --spacing-md: 20px;
    --spacing-sm: 10px;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.1);
    --color-primary: #ffffff;
    --transition-fast: 0.3s;
    --button-primary-bg: #ffcc00;
    --button-primary-text: #2c3e50;
    --button-secondary-bg: #e6b800;
    --button-secondary-text: #2c3e50;
    --radius-md: 5px;
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.2);
    --container-max-width: 1200px;
    --bg-secondary: #f7f7f7;
    --bg-tertiary: #cad0d7;
    --text-secondary: #bdc3c7;
    --box-bg: #ffffff;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* RGB values for backgrounds (for opacity support) */
    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary-rgb: 248, 249, 250;
}

/* General Styles */
body {
    margin: 0;
    font-family: var(--font-family-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    padding-bottom: 60px;
    width: 90%;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

/* Header Styles */
.header {
    background-color: var(--header-bg);
    color: #fff;
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.header h1 {
    margin: 0;
    font-size: 32px;
    color: #ffcc00;
}

.header h1 span {
    color: #ecf0f1;
}

/* Navbar Alignment */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar ul {
    list-style: none;
    padding: 0;
    display: flex;
    margin: 0;
}

.navbar ul li {
    margin: 0 15px;
}

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px; /* Increased padding for better click area */
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.navbar ul li a:hover {
    background-color: var(--color-primary);
    color: var(--header-bg); /* Dark text when hovered */
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f5f5f5, #c4c4c4, #646464);
    color: #fff;
    padding: 60px 20px;
}

.hero-text h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-button {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    padding: 15px 30px;
    text-decoration: none;
    font-size: 18px;
    border-radius: var(--radius-md);
    font-weight: bold;
}

.cta-button:hover {
    background-color: var(--button-secondary-bg);
}

.hero-image img {
    width: 80%;
    height: 30%;
    display: block;
    object-fit: cover;
    opacity: 0.6;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Adds a subtle shadow */
}

/* Purpose Section */
.purpose {
    background-color: #f9f9f9;
    padding: 40px 20px;
    text-align: center;
}

.purpose h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.features {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 20px;
}

.feature {
    width: 23%;
    text-align: center;
    background-color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature img {
    max-width: 50px;
    margin-bottom: 10px;
}

.feature h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 16px;
    color: #555;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 20px 0;
    background-color: var(--header-bg);
    color: #fff;
    text-align: center;
}

/* Feature Box Styles */
.feature {
    width: 23%;
    text-align: center;
    background-color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature img {
    max-width: 80px;
    margin-bottom: 10px;
}

.feature h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 16px;
    color: #555;
}

/* Hover Effect */
.feature:hover {
    transform: scale(1.05); /* Enlarge the box */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Add a stronger shadow */
}

/* User Area (Right Alignment) */
.user-area {
    margin-left: auto; /* Push to the right */
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: var(--color-primary);
    font-weight: bold;
    color: #fff;
}

.tokens {
    color: #fff;
}

.auth-link, .logout-btn, .btn-login, .btn-signup {
    background-color: var(--button-primary-bg); /* Match logout button */
    color: var(--button-primary-text); /* Dark text */
    padding: 10px 15px;
    font-size: 14px;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: bold;
    transition: background-color var(--transition-fast);
}

.auth-link:hover, .logout-btn:hover, .btn-login:hover, .btn-signup:hover {
    background-color: var(--button-secondary-bg); /* Darker shade on hover */
}

/* Login Form */
#loginForm input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    display: block;
    border: 1px solid #ccc;
    border-radius: var(--radius-md);
}

#loginForm button {
    width: 100%;
    padding: 10px;
    background-color: var(--button-primary-bg);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
}

#loginForm button:hover {
    background-color: var(--button-secondary-bg);
}

/* Modal Styles */
.modal {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-fast); /* Smooth fade effect */
}

/* Ensuring modal-content is properly centered */
.modal-content {
    background: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
    color: #acaeaf;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* Title styling */
.modal-content h2 {
    color: #000000;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Input field styling */
.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #d7d7d7;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--button-primary-bg);
}

.modal-content label {
    color: #b1b1b1;
    font-weight: 500;
    display: block;
    margin-top: 10px;
}

.modal-content .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    color: #bebebe;
    cursor: pointer;
}

/* Close button styling */
.modal-content .close:hover {
    color: var(--color-primary);
}

/* User Details Styles */
.user-details {
    background: #ffffff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.user-info-field {
    background: #ffffff;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
}

.user-info-field label {
    font-weight: 500;
    color: #2c3e50;
}

.user-info-field span {
    color: #2c3e50;
}

.total-tokens-field {
    background: #ffffff;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
}

.update-profile-btn {
    background: var(--button-primary-bg);
    color: #2c3e50;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.update-profile-btn:hover {
    background: var(--button-secondary-bg);
}

/* Learning*/

.level-boxes {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.level-box {
    position: relative;
    background: var(--box-bg);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.level-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
}

.subtopics {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.subtopics.show {
    display: block;
}

.subtopic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
}

.subtopic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.subtopic-row:last-child {
    border-bottom: none;
}

.subtopic-name {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

.subtopic-row .learn-material,
.subtopic-row .start-quiz,
.subtopic-row .retake-quiz {
    background-color: #ffcc00;
    color: #2c3e50;
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

.subtopic-row .learn-material:hover,
.subtopic-row .start-quiz:hover,
.subtopic-row .retake-quiz:hover {
    background-color: #e6b800;
    transform: translateY(-1px);
}

.level-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.level-box.locked {
    background-color: #666; /* Gray for locked levels */
    color: #ccc; /* Light text for locked levels */
    pointer-events: none;
    opacity: 0.7;
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribute elements evenly */
    width: 100%;
}

.level-left img {
    width: 120px; /* Adjust image size */
    height: auto;
    border-radius: var(--radius-md);
}

.level-middle {
    flex: 1; /* Allow text to take available space */
    text-align: center;
    position: relative;
}

.level-right {
    display: flex;
    align-items: center;
}

.level-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.level-info img {
    width: 200px;
    height: auto;
    border-radius: var(--radius-md);
}

.details h3 {
    margin: 0;
    font-size: 1.5em;
}

.details p {
    color: #bbb;
    margin: 5px 0 0;
}

.toggle-button {
    background-color: var(--button-primary-bg);
    color: black;
    font-size: 18px;
    font-weight: bold;
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.toggle-button:hover {
    background-color: var(--button-secondary-bg);
}

.subtopics {
    display: none; /* Default hidden */
    margin-top: 20px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast) ease-in-out;
}

.subtopics.active {
    display: table-row;
}


.subtopic {
    display: block;
    padding: 10px 15px;
    background: linear-gradient(135deg, #435b56, #78b5a6);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    color: white;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.subtopic:hover {
    background-color: #555;
}


.subtopic.locked {
    opacity: 0.6;
    pointer-events: none;
}

.subtopic h4 {
    margin: 0 0 10px;
    color: #fff;
}

.subtopic-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.subtopic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.subtopic-name {
    flex-grow: 1;
    font-size: 16px;
    color: white;
}

.locked-message {
    color: #aaa;
}

.subtopic-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.subtopic-row:last-child {
    border-bottom: none;
}

.subtopic-status {
    margin-right: 10px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.status-new {
    background-color: #2ecc71;
    color: white;
}

.status-completed {
    background-color: #3498db;
    color: white;
}

.subtopic-title {
    flex: 1;
    margin-right: 15px;
    color: #2c3e50;
}

.subtopic-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.back-button:hover {
    background-color: #5a6268;
}

.button-container {
    display: flex;
    gap: 10px; /* Add space between buttons */
    align-items: center; /* Center align buttons vertically */
}

button.learn-material, button.start-quiz, button.retake-quiz {
    padding: 10px 20px;
    font-size: 14px;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Content Box Styling */
.content-box {
    width: 80%; /* Adjust width here (70% or 80%) */
    margin: 0 auto; /* Centers the box horizontally */
    padding: 20px;
  /*  background-color: white; /* Optional: Background color for better visibility */
    border-radius: var(--radius-md); /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    text-align: center; /* Center align text */
}

/* Back Button */
.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
}

.back-button:hover {
    background-color: #0056b3;
}

/*Quiz Process Section*/

.quiz-result {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    text-align: center;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quiz-result h2 {
    color: var(--header-bg);
    margin-bottom: 15px;
}

.quiz-result p {
    font-size: 18px;
    margin: 10px 0;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: bold;
}

.btn:hover {
    background-color: var(--button-secondary-bg);
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
    background: var(--bg-primary);
    min-height: calc(100vh - 80px);
}

.dashboard .box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.dashboard h2, 
.history-content h2,
.user-details h2,
.badge-box h2,
.performance-overview h2,
.leaderboard-box h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* History Box */
.history-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.achievement-item {
    background: #ffffff;
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.achievement-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.achievement-details {
    color: #666666;
    font-size: 0.8rem;
}

/* Performance Box */
.performance-box {
    background: var(--box-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.performance-box h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.chart-container {
    height: 250px;
    width: 100%;
    position: relative;
    padding: 10px;
    background: var(--box-bg);
}

/* Dark mode adjustments */
[data-theme="dark"] .chart-container {
    background: #1e2a38;
}

[data-theme="dark"] .performance-box {
    background: #1e2a38;
}

/* Colorblind mode adjustments */
[data-theme="colorblind"] .chart-container {
    background: #ffffff;
}

[data-theme="colorblind"] .performance-box {
    background: #ffffff;
    border: 1px solid #000000;
}

/* Leaderboard Box */
.leaderboard-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.leaderboard-box table {
    width: 100%;
    border-collapse: collapse;
    color: #2c3e50;
}

.leaderboard-box th,
.leaderboard-box td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.leaderboard-box th {
    color: #2c3e50;
    font-weight: 600;
    background-color: #f8f9fa;
}

.leaderboard-box tr:hover {
    background: #f8f9fa;
}

/* User Details Box */
.user-details {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.user-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
}

.user-info-label {
    color: #2c3e50;
    font-weight: 500;
}

.user-info-value {
    color: #2c3e50;
}

/* Available Badges */
.badge-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.badge-box .badge-item {
    background: #ffffff;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-box .badge-item.bronze {
    background-color: #cd7f32;
    color: #fff;
}

.badge-box .badge-item.silver {
    background-color: #b1b1b1;
    color: #fff;
}

.badge-box .badge-item.gold {
    background-color: #ffd700;
    color: #fff;
}

.badge-box .badge-name {
    color: #2c3e50;
    font-weight: 500;
}

.badge-box .badge-tokens {
    color: #2c3e50;
    font-size: 0.9em;
}

/* Update Profile Button */
.update-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    color: #2c3e50;
    cursor: pointer;
}

.close:hover {
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #34495e;
    border-radius: var(--radius-md);
    background: #cddaeb;
    color: #000000;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-primary {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: bold;
}

.btn-primary:hover {
    background: var(--button-secondary-bg);
}

.error-message {
    color: #e74c3c;
    margin-bottom: 10px;
    display: none;
}

/* Chart Customization */
#performanceChart {
    background: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard .container {
        padding: 0 15px;
    }

    .achievement-item {
        padding: 10px;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

/* Top Row Layout */
.top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* User Details Box */
.user-details-box .user-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #d5d5d5;
    border-radius: var(--radius-md);
}

.info-item .label {
    color: #000000;
}

.info-item .value {
    color: #000000;
    font-weight: 500;
}

.update-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: background-color var(--transition-fast);
}

.update-btn:hover {
    background: var(--button-secondary-bg);
}

/* Badges Box */
.badges-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1e2a38;
    border-radius: var(--radius-md);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.badge-item.active {
    opacity: 1;
}

.badge-icon {
    font-size: 24px;
}

.badge-name {
    font-weight: bold;
    color: #fff;
}

.badge-requirement {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 992px) {
    .top-row {
        grid-template-columns: 1fr 1fr;
    }
    .badges-box {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .top-row {
        grid-template-columns: 1fr;
    }
    .badges-box {
        grid-column: span 1;
    }
}

/* Learning Page Styles */
.learning-page {
    padding: 2rem 0;
    background: #1a1a1a;
    min-height: calc(100vh - 80px);
}

.learning-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.level-box {
    background: var(--header-bg);
    border-radius: var(--radius-md);
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.level-header {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-progress {
    color: #bdc3c7;
    font-size: 0.85rem;
}

.subtopic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subtopic-item {
    background: #1e2a38;
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.subtopic-item:hover {
    background: #34495e;
}

.subtopic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.subtopic-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.subtopic-score {
    color: #bdc3c7;
    font-size: 0.75rem;
}

.subtopic-details {
    color: #bdc3c7;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.subtopic-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-icon {
    width: 25px;
    height: 25px;
    opacity: 0.8;
}

.status-complete {
    color: #2ecc71;
}

.status-in-progress {
    color: #f1c40f;
}

.status-locked {
    color: #95a5a6;
}

.locked-message {
    color: #95a5a6;
    font-size: 0.75rem;
    font-style: italic;
}

/* Quiz Button Styles */
.start-quiz-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.start-quiz-btn:hover {
    background: var(--button-secondary-bg);
}

.start-quiz-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Responsive Design for Learning Page */
@media (max-width: 992px) {
    .learning-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .learning-container {
        grid-template-columns: 1fr;
    }
}

/* Disclaimer Section */
.disclaimer {
    background: linear-gradient(135deg, #1e2a38, #2c3e50);
    color: #ffffff;
    padding:  0;
    margin-top: 0px;
    margin-bottom: 0px;
}

.disclaimer-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 5px;
}

.disclaimer h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0px;
    text-align: center;
}

.disclaimer p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.disclaimer ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.disclaimer li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #ecf0f1;
    font-size: 1.1rem;
}

.disclaimer li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* Dark mode adjustments */
[data-theme="dark"] .disclaimer {
    background: linear-gradient(135deg, #0a0f14, #1a242f);
}

/* Colorblind mode adjustments */
[data-theme="colorblind"] .disclaimer {
    background: #ffffff;
    border: 2px solid #000000;
}

[data-theme="colorblind"] .disclaimer h2,
[data-theme="colorblind"] .disclaimer p,
[data-theme="colorblind"] .disclaimer li {
    color: #000000;
}

[data-theme="colorblind"] .disclaimer li:before {
    color: #000000;
}

/* Feedback Page Styles */
.feedback-section {
    padding: 2rem 0;
    background: var(--bg-primary);
    min-height: calc(100vh - 80px);
}

.feedback-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.feedback-box h2 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.feedback-intro {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.rating-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rating-group {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: var(--radius-md);
}

.rating-group label {
    color: var(--text-primary);
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.stars {
    display: flex;
    gap: 5px;
}

.stars i {
    color: #95a5a6;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color var(--transition-fast);
}

.stars i.fas,
.stars i:hover {
    color: var(--color-primary);
}

.stars i.selected {
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #34495e;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.submit-btn {
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    align-self: center;
}

.submit-btn:hover {
    background: var(--button-secondary-bg);
}

.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
}

.alert.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.alert.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .feedback-box {
        margin: 0 15px;
        padding: 20px;
    }

    .rating-groups {
        grid-template-columns: 1fr;
    }
}

/* User Details Fields */
.user-details input,
.user-details .info-field {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    color: #2c3e50;
}

.user-details .field-group {
    margin-bottom: 15px;
}

.user-details label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

/* Badge Items */
.badge-item {
    background: #ffffff;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-icon {
    width: 24px;
    height: 24px;
}

.badge-details {
    display: flex;
    flex-direction: column;
}

.badge-name {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 2px;
}

.badge-tokens {
    color: #2c3e50;
    font-size: 0.9em;
}

/* Username and Email Fields */
.user-field {
    background: #ffffff;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.total-tokens {
    background: #ffffff;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2c3e50;
}

.total-tokens .token-icon {
    color: #2c3e50;
}

.user-info-field,
.total-tokens-field {
    background: #FFFFFF;
    color: #000000;
    padding: 12px 15px;
    border: 2px solid #0077BB;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.user-info-field span,
.total-tokens-field span {
    color: #000000;
    font-weight: 600;
}

/* Bonus Content Styles */
.bonus-item {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px !important;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.bonus-item:hover {
    background: #f0f0f0;
    cursor: pointer;
}

.bonus-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bonus-buttons {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.bonus-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.bonus-cost {
    font-size: 0.9em;
    color: #666;
}

.unlock-btn, .use-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 80px;
}

.unlock-btn {
    background: #4CAF50;
    color: white;
}

.unlock-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.use-btn {
    background: #2196F3;
    color: white;
}

.use-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.unlock-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.token-count {
    margin-right: 15px;
    color: #666;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.password-options {
    margin: 20px 0;
}

.password-options label {
    display: block;
    margin: 10px 0;
    color: #333;
}

.password-options input[type="number"] {
    width: 80px;
    padding: 5px;
    margin-left: 10px;
}

.password-result {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2em;
    word-break: break-all;
}

.copy-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.copy-btn:hover {
    background: #45a049;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

/* Bonus Grid Layout */
.bonus-expandable {
    display: none; /* Start hidden by default */
    background: var(--bg-secondary);
    padding: 20px;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.bonus-grid-item {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    height: 200px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bonus-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.bonus-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bonus-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bonus-item-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.7) 40%,
        rgba(0,0,0,0.4) 60%,
        rgba(0,0,0,0.1) 100%
    );
}

.bonus-overlay-title {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
}

.bonus-item-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 3;
    width: 100%;
    padding: 0 20px;
}

.bonus-cost {
    color: rgba(255,255,255,0.95);
    font-size: 1.1em;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    display: block;
    margin-top: 5px;
}

/* Update gradient overlay for better text visibility */
.bonus-item-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(45deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.6) 50%,
        rgba(0,0,0,0.8) 100%
    );
}

/* High contrast adjustments */
[data-theme="blind"] .bonus-grid-item {
    border: 2px solid #fff;
    box-shadow: none;
}

[data-theme="blind"] .bonus-item-inner {
    background: linear-gradient(to top, 
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.9) 100%
    );
}

[data-theme="blind"] .unlock-btn,
[data-theme="blind"] .use-btn {
    border: 2px solid #fff;
    background: #000;
    color: #fff;
    padding: 10px 20px;
}

[data-theme="blind"] .unlock-btn:hover,
[data-theme="blind"] .use-btn:hover {
    background: #fff;
    color: #000;
}

.status-wrapper {
    position: absolute;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    z-index: 10;
}

.status-icon {
    width: 18px;
    height: 18px;
    opacity: 0.4;
}

.progress {
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 5px 0;
    height: 8px;
    width: 80%;
    margin: 5px auto;
}

.progress-bar {
    background-color: #4CAF50;
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

/* Table and Button Styles */
.subtopic-table tr {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.subtopic-table tr:last-child {
    border-bottom: none;
}

.subtopic-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.subtopic-table .subtopic-name {
    color: #2c3e50;
    font-size: 14px;
}

.learn-material,
.start-quiz,
.retake-quiz {
    background-color: #ffcc00;
    color: #2c3e50;
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

.learn-material:hover,
.start-quiz:hover,
.retake-quiz:hover {
    background-color: #e6b800;
    transform: translateY(-1px);
}

.level-box.locked {
    opacity: 0.7;
}

.level-box.locked .subtopic-table {
    opacity: 0.7;
}

.level-box:hover {
    transform: translateY(-2px);
}

.toggle-button {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.toggle-button.active {
    transform: rotate(45deg);
}

/* Password Generator Styles */
.password-generator {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.password-display input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.copy-btn {
    padding: 8px 12px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #27ae60;
}

.crack-time {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.crack-time h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

#crackTime {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.password-history {
    margin-top: 30px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: monospace;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e9ecef;
}

.password-span {
    cursor: pointer;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-span:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.password-score {
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
    margin-left: 10px;
}

.challenge-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.challenge-card.completed {
    background: #f0f9f4;
    border: 1px solid #2ecc71;
}

.challenge-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #2ecc71;
    font-size: 1.2rem;
}

.challenge-card h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.challenge-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.challenge-card .reward {
    display: inline-block;
    background: #f1c40f;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.challenge-notification {
    white-space: pre-line;
    font-family: system-ui, -apple-system, sans-serif;
}

.challenge-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.challenge-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e1e1;
    position: relative;
}

.challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.challenge-card.completed {
    background: #f0fff4;
    border-color: #2ecc71;
}

.challenge-card.completed::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #2ecc71;
    font-size: 1.2rem;
    font-weight: bold;
}

.challenge-card h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.challenge-card p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.challenge-card .reward {
    display: inline-block;
    background: #f1c40f;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

#tokens-display {
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #e74c3c;
}

/* Bonuses Table Styles */
.bonuses-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.bonuses-table th,
.bonuses-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.bonuses-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.bonuses-table tr:hover {
    background-color: #f9f9f9;
}

/* Index Page Specific Styles */

/* Header and Navigation */
.header .container {
    position: relative;
    padding: 15px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: minmax(280px, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    margin: 0 auto;
    max-width: 100%;
}

.feature {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 0.5rem;
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #000;
}

/* Tutorial Slideshow */
.tutorial-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.tutorial-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.slide {
    display: none;
    text-align: center;
    padding: 20px;
}

.slide.active {
    display: block;
    animation: fadeIn 0.5s;
}

.slide img {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.slide h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.slide p {
    color: #34495e;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
}

.nav-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #45a049;
}

.nav-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.dots {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.dot {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #4CAF50;
}

.close-tutorial {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-tutorial:hover {
    color: #333;
}

/* Message Bar */
.message-bar {
    background: #1a237e;
    color: white;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.message-content {
    white-space: nowrap;
    animation: scrollMessage 20s linear infinite;
    display: inline-block;
    padding-right: 50px;
}

@keyframes scrollMessage {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Get Started Button */
.get-started-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
}

.get-started-btn:hover {
    background: #45a049;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .navbar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(44, 62, 80, 0.97);
        padding: 60px 1rem 1rem;
        z-index: 1001;
        overflow-y: auto;
    }

    .navbar.active {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        gap: 15px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .navbar ul li {
        width: 100%;
        margin: 0;
    }

    .navbar ul li a {
        display: block;
        padding: 12px;
        text-align: center;
        font-size: 1.1rem;
        color: white;
        text-decoration: none;
    }

    .user-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
        margin-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .user-area > * {
        width: auto;
        min-width: 200px;
        text-align: center;
        margin: 8px 0;
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    .message-bar {
        font-size: 14px;
        padding: 6px 0;
    }
}

@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        gap: 2rem;
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .features {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
        gap: 2rem;
        padding: 2rem 0;
    }

    .feature {
        padding: 2rem;
    }

    .feature h3 {
        font-size: 1.5rem;
    }

    .feature p {
        font-size: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .feature {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .feature:active {
        transform: scale(0.98);
    }
}

/* Dark mode considerations */
@media (prefers-color-scheme: dark) {
    .feature {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .feature {
        border: 2px solid currentColor;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .feature {
        transition: none;
    }
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
        z-index: 1002;
        background: transparent;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }

    .navbar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(44, 62, 80, 0.97);
        padding: 60px 1rem 1rem;
        z-index: 1001;
        overflow-y: auto;
    }

    .navbar.active {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        gap: 15px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .navbar ul li {
        width: 100%;
        margin: 0;
    }

    .navbar ul li a {
        display: block;
        padding: 12px;
        text-align: center;
        font-size: 1.1rem;
        color: white;
        text-decoration: none;
    }

    .user-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
        margin-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .user-area > * {
        width: auto;
        min-width: 200px;
        text-align: center;
        margin: 8px 0;
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    .btn-login,
    .btn-signup {
        display: inline-block;
        border-radius: 4px;
        color: white;
        text-decoration: none;
        border: none;
        cursor: pointer;
        font-weight: bold;
        width: 100%;
        text-align: center;
    }

    .btn-login {
        background: #3498db;
    }

    .btn-signup {
        background: #2ecc71;
    }

    /* Mobile Modal Adjustments */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input {
        font-size: 16px; /* Prevent iOS zoom on input */
        padding: 12px;
    }

    /* Mobile Tutorial Adjustments */
    .tutorial-content {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .slide img {
        max-width: 100%;
        height: auto;
    }

    .slide h3 {
        font-size: 20px;
        margin: 10px 0;
    }

    .slide p {
        font-size: 14px;
        margin: 10px 0;
    }

    .tutorial-nav {
        padding: 10px 0;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Mobile Features Grid */
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .feature {
        padding: 1rem;
    }

    .feature h3 {
        font-size: 1.2rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    /* Mobile Message Bar */
    .message-bar {
        font-size: 14px;
        padding: 6px 0;
    }

    /* Mobile Get Started Button */
    .get-started-btn {
        padding: 12px 24px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
        margin: 15px auto;
        display: block;
    }
}

/* Fix iOS 100vh issue */
@supports (-webkit-touch-callout: none) {
    .navbar,
    .modal,
    .tutorial-modal {
        height: -webkit-fill-available;
    }
}

/* Ensure proper z-index stacking */
.modal {
    z-index: 1000;
}

.tutorial-modal {
    z-index: 1001;
}

.nav-toggle {
    z-index: 1002;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
