* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: #f5f7fa;
	color: #333;
	line-height: 1.6;
	margin: 0;
	padding: 0;
	position: relative; /* prevent top-margin collapse from first child */
	overflow-x: hidden; /* avoid accidental horizontal scroll */
}

/* ===== WHATSAPP BANNER ===== */
.whatsapp-banner {
    background: linear-gradient(135deg, #2a5298 0%, #2a5298 100%);
    color: whitesmoke;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex !important;
}

.banner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    animation: whatsappPulse 2s ease-in-out infinite;
}

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

.banner-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.join-whatsapp-btn {
    background: white;
    color: #25d366;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.join-whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.whatsapp-logo {
    width: 18px;
    height: 18px;
}

/* ===== PDF UPLOAD Banner ===== */
#pdf-upload {
    padding: 40px 16px;
    background: linear-gradient(135deg, #f2f7ff 0%, #f9fbff 100%);
    border-top: 1px solid #e6eefb;
    margin: 40px 0;
}

.pdf-header {
    margin-bottom: 28px;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f4f8;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    h2 {
        font-size: 22px;
    }

    #pdf-upload {
        padding: 24px 16px;
        margin: 20px 0;
    }
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    min-height: 44px;
    border: 2px solid transparent;
    white-space: nowrap;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

        .file-input-label:active {
            transform: translateY(0);
        }

        #pdf-file-input {
            display: none;
        }

        .auth-input,
        .form-input {
            width: 100%;
            padding: 12px 14px;
            border: 1.5px solid #e0e6ed;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            transition: all 0.3s ease;
            background: white;
            color: #333;
        }

        .auth-input:focus,
        .form-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            background: #fafbfc;
        }

        .auth-input::placeholder,
        .form-input::placeholder {
            color: #999;
        }

        .file-name {
            font-size: 13px;
            color: #666;
            margin-top: 8px;
            padding: 8px 12px;
            background: #f5f7fa;
            border-radius: 6px;
            border-left: 3px solid #667eea;
        }

        #pdf-upload-status {
            margin-top: 16px;
            font-size: 14px;
            display: none;
        }

        .status-message {
            padding: 12px 16px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .status-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .status-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .status-loading {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        /* ===== HEADER ===== */
       header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1rem 0;
            position: sticky;
				top: 56px;
            z-index: 999;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        /* Ensure exam interface stays on top when active */
        .exam-interface.active {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            z-index: 10000 !important;
            overflow-y: auto !important;
        }        .header-container {
            max-width: 100%;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
		
			.logo::before {
				content: "🧠";
				font-size: 2rem;
			}

        .logo span {
            color: #00d4ff;
        }

        nav {
            display: flex;
            gap: 2rem;
        }

        nav.nav-menu {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            flex-wrap: wrap;
            justify-content: center;
            transition: all 0.3s ease;
            max-width: 100%;
        }

        nav a {
            color: white;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
            padding: 0.6rem 0.8rem;
            border-radius: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            white-space: nowrap;
            line-height: 1.2;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        nav a:hover {
            color: white;
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.3);
        }
        
        nav a:active {
            transform: translateY(0);
        }
        
        /* Login/Signup Buttons in Nav */
        nav .login-btn {
            padding: 0.6rem 1rem;
            border-radius: 8px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
            border: 1px solid rgba(255, 255, 255, 0.3);
            font-weight: 700;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        nav .login-btn:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.25));
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }
        
        nav .signup-btn {
            padding: 0.5rem 1rem;
            border-radius: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white !important;
            transition: all 0.3s ease;
        }
        
        nav .signup-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        nav .upload-link,
        nav .ai-avatar-link {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
            border: 1px solid rgba(255, 255, 255, 0.25);
            font-weight: 700;
        }
        
        nav .upload-link:hover,
        nav .ai-avatar-link:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        }
        
        nav .call-link {
            color: #fff;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
            border: 1px solid rgba(255, 215, 0, 0.4);
            font-weight: 700;
        }

        nav .call-link:hover {
            color: #fff;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 193, 7, 0.3));
            border-color: rgba(255, 215, 0, 0.6);
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
        }

        nav .daily-quiz-link {
            color: #fff;
            background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(255, 64, 129, 0.2));
            border: 1px solid rgba(255, 107, 157, 0.4);
            font-weight: 700;
            animation: quizPulse 2s ease-in-out infinite;
        }
        @keyframes quizPulse {
            0%, 100% { 
                box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4);
                transform: scale(1);
            }
            50% { 
                box-shadow: 0 0 20px 5px rgba(255, 107, 157, 0.2);
                transform: scale(1.02);
            }
        }

        nav .daily-quiz-link:hover {
            color: #fff;
            background: linear-gradient(135deg, rgba(255, 107, 157, 0.4), rgba(255, 64, 129, 0.3));
            border-color: rgba(255, 107, 157, 0.6);
        }

        /* ===== MOBILE MENU TOGGLE ===== */
        .mobile-menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 5px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            padding: 0.6rem;
            transition: all 0.3s ease;
        }
        
        .mobile-menu-toggle:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        .mobile-menu-toggle span {
            width: 25px;
            height: 3px;
            background: white;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .mobile-menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(10px, 10px);
        }

        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }

        .mobile-menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(7px, -7px);
        }

        .header-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 0.7rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .header-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
        }

        /* ===== HERO SECTION ===== */
        .hero {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 80px 2rem;
            text-align: center;
        }

        .hero-content {
            max-width: 900px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .hero p {
            font-size: 1rem;
            margin-bottom: 2rem;
            line-height: 0.5;
            opacity: 0.95;
            font-style: italic;            
        }

        .hero-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
            margin-top: 3rem;
        }

        .stat-box {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            color: #00d4ff;
        }

        .stat-label {
            font-size: 0.9rem;
            opacity: 0.9;
            margin-top: 0.5rem;
        }

        .cta-button {
            display: inline-block;
            background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
            color: white;
            padding: 1rem 2.5rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 700;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
        }

        /* ===== MOCK TESTS SECTION ===== */
        .mock-tests-section {
            max-width: 1400px;
            margin: 0 auto;
            padding: 5rem 2rem;
        }

        .section-header {
            text-align: center;
            margin-bottom: 4rem;
        }

        .section-header h2 {
            font-size: 2.8rem;
            color: #1e3c72;
            margin-bottom: 1rem;
        }

        .section-header p {
            font-size: 1.1rem;
            color: #666;
            max-width: 600px;
            margin: 0 auto;
        }

        .tests-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .test-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .test-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
            border-color: #667eea;
        }

        .test-card-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 2rem 1.5rem;
            position: relative;
            overflow: hidden;
        }

        .test-card-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }

        .test-icon {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }

        .test-title {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 0.3rem;
        }

        .test-subtitle {
            font-size: 0.85rem;
            opacity: 0.9;
        }

        .test-card-body {
            padding: 1.5rem;
        }

        .test-meta {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .meta-item {
            background: #f5f7fa;
            padding: 0.8rem;
            border-radius: 8px;
            text-align: center;
        }

        .meta-label {
            font-size: 0.8rem;
            color: #999;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.3rem;
        }

        .meta-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: #667eea;
        }

        .test-features {
            list-style: none;
            margin: 1.5rem 0;
            padding: 0;
        }

        .test-features li {
            padding: 0.5rem 0;
            padding-left: 1.5rem;
            position: relative;
            color: #666;
            font-size: 0.95rem;
        }

        .test-features li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #4caf50;
            font-weight: bold;
        }

        .test-card-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid #f0f0f0;
            display: flex;
            gap: 1rem;
        }

        .start-btn {
            flex: 1;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 0.8rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .start-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .details-btn {
            flex: 1;
            background: transparent;
            color: #667eea;
            border: 2px solid #667eea;
            padding: 0.8rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .details-btn:hover {
            background: #f5f7ff;
        }

			/*nav {
				display: flex;
				justify-content: space-between;
				align-items: center;
				max-width: 1200px;
				margin: 0 auto;
				padding: 0 2rem;
			}

			.logo {
				font-size: 2.0rem;
				font-weight: bold;
				display: flex;
				align-items: center;
				gap: 0.5rem;
			}

			

			.nav-menu {
				display: flex;
				list-style: none;
				gap: 2rem;
			}

			.nav-menu a {
				color: white;
				text-decoration: none;
				font-weight: 500;
				transition: color 0.3s ease;
				cursor: pointer;
			}

			.nav-menu a:hover {
				color: #ffd700;
			}
*/
			.mobile-menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 4px;
        }
        
        .mobile-menu-toggle span {
            width: 25px;
            height: 3px;
            background: white;
            transition: 0.3s;
        }
			/* Container */
			.container {
				max-width: 1200px;
				margin: 0 auto;
				padding: 0 2rem;
			}
			
			/* Features Section */
			.features {
				padding: 80px 0;
				background: #f8f9fa;
			}

			.section-title {
				text-align: center;
				font-size: 2.5rem;
				margin-bottom: 3rem;
				color: rgb(255, 0, 0);
			}

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

			.feature-card {
				background: white;
				padding: 2rem;
				border-radius: 15px;
				text-align: center;
				box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
				transition: transform 0.3s ease, box-shadow 0.3s ease;
			}

			.feature-card:hover {
				transform: translateY(-5px);
				box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
			}

			.feature-icon {
				font-size: 4rem;
				margin-bottom: 1rem;
			}

			.feature-card h3 {
				font-size: 1.5rem;
				margin-bottom: 1rem;
				color: #667eea;
			}

			/* Exam Selection - FIXED */
			.exam-selection {
				padding: 80px 0;
				background: linear-gradient(135deg, #e6e0e6 0%, #f6f3f3 100%);
				color: white;
			}

			.notice-banner {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            padding: 1rem;
            margin: 2rem auto 3rem;
            max-width: 800px;
            display: flex;
            align-items: center;
            gap: 1rem;
            backdrop-filter: blur(10px);
        }
        
        .notice-icon {
            font-size: 1.5rem;
            flex-shrink: 0;
        }
        
        .notice-text {
            font-size: 0.95rem;
            line-height: 1.5;
        }
        
			.exam-cards-container {
				display: grid;
				grid-template-columns: repeat(4, 1fr);
				gap: 2rem;
				max-width: 1200px;
				margin: 0 auto;
			}

			.exam-card {
				background: rgba(255, 255, 255, 0.95);
				color: #333;
				padding: 2.5rem;
				border-radius: 20px;
				text-align: center;
				transition: all 0.3s ease;
				box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				min-height: 400px;
			}
			.exam-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #667eea, #764ba2);
        }

			.exam-card:hover {
				transform: translateY(-10px);
				box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
			}

			.neet-card::before {
            	background: linear-gradient(90deg, #f093fb, #f5576c);
        	}
        
        	.foundation-card::before {
            	background: linear-gradient(90deg, #4facfe, #00f2fe);
        	}

			.exam-icon {
				font-size: 4rem;
				margin-bottom: 1.5rem;
			}

			.exam-card h3 {
				font-size: 1.8rem;
				margin-bottom: 1rem;
				color: #333;
			}

			.exam-card p {
				font-size: 1rem;
				margin-bottom: 1.5rem;
				color: #666;
				line-height: 1.6;
				flex-grow: 1;
			}

			.exam-features {
            list-style: none;
            text-align: left;
            margin: 1.5rem 0;
            padding: 0;
        	}

			.exam-features li {
            padding: 0.5rem 0;
            color: #555;
            font-size: 0.95rem;
        	}

			.exam-select-btn {
				background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
				color: white;
				border: none;
				padding: 15px 30px;
				border-radius: 50px;
				font-size: 1.1rem;
				font-weight: bold;
				cursor: pointer;
				transition: all 0.3s ease;
				width: 100%;
				margin-top: auto;
			}

			.exam-select-btn:hover {
				transform: translateY(-2px);
				box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
			}

			.neet-card .exam-select-btn {
            	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        	}
        
        	.foundation-card .exam-select-btn {
            	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        	}
	
			/* Auth Modal */
			.modal {
				display: none;
				position: fixed;
				z-index: 2000;
				left: 0;
				top: 0;
				width: 100%;
				height: 100%;
				background-color: rgba(0, 0, 0, 0.5);
			}

			.modal-content {
				background-color: white;
				margin: 5% auto;
				padding: 2rem;
				border-radius: 15px;
				width: 90%;
				max-width: 500px;
				position: relative;
			}

			
        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }        

			.modal-close {
				position: absolute;
				right: 1rem;
				top: 1rem;
				font-size: 2rem;
				cursor: pointer;
				color: #999;
			}

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

			.auth-form {
				display: flex;
				flex-direction: column;
				gap: 1rem;
			}

			.auth-input {
				padding: 12px;
				border: 2px solid #e0e6ed;
				border-radius: 8px;
				font-size: 1rem;
				transition: border-color 0.3s ease;
			}

			.auth-input:focus {
				outline: none;
				border-color: #667eea;
			}

			.auth-button {
				background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
				color: white;
				border: none;
				padding: 12px;
				border-radius: 8px;
				font-size: 1rem;
				font-weight: bold;
				cursor: pointer;
			}

			.auth-button:hover {
            	transform: translateY(-2px);
        	}

			.auth-toggle {
				text-align: center;
				margin-top: 1rem;
				color: #667eea;
				cursor: pointer;
			}

			/* User Profile */
			.user-profile {
            position: fixed;
            top: 15px;
            right: 2rem;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            padding: 0.5rem 1rem;
            border-radius: 25px;
            color: white;
            cursor: pointer;
            z-index: 1000;
			}

			.user-dropdown {
				position: absolute;
				top: 100%;
				right: 0;
				background: white;
				color: #333;
				min-width: 200px;
				border-radius: 10px;
				box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
				display: none;
				z-index: 1001;
			}

			.user-dropdown.show {
				display: block;
			}

			.dropdown-item {
				padding: 0.8rem 1rem;
				cursor: pointer;
				border-bottom: 1px solid #f0f0f0;
			}

			.dropdown-item:hover {
				background: #f8f9fa;
			}

			/* Subject Selection Styles */
.subject-selection,
.chapter-selection,
.topic-selection,
.test-mode-selection {
    padding: 120px 0 80px;
    background: #f8f9fa;
    min-height: 100vh;
}

.subject-selection-grid,
.chapter-grid,
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.subject-card,
.chapter-card,
.topic-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
}

.subject-card:hover,
.chapter-card:hover,
.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.subject-card.botany {
    border-top: 5px solid #4CAF50;
}

.subject-card.zoology {
    border-top: 5px solid #FF9800;
}

.subject-card.physics {
    border-top: 5px solid #2196F3;
}

.subject-card.chemistry {
    border-top: 5px solid #F44336;
}

.subject-icon,
.chapter-icon,
.topic-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.subject-card h3,
.chapter-card h3,
.topic-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.subject-card p,
.chapter-card p,
.topic-card p {
    color: #666;
    font-size: 0.95rem;
}

.chapter-count,
.topic-count,
.question-count {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Test Mode Selection */
.selection-summary {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.selection-summary h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.selection-summary p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.test-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.test-mode-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.test-mode-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.practice-mode {
    border-top: 5px solid #4CAF50;
}

.exam-mode {
    border-top: 5px solid #F44336;
}

.mode-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.test-mode-card h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.mode-features {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
    padding: 0;
}

.mode-features li {
    padding: 0.7rem 0;
    color: #555;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.mode-select-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.mode-select-btn.exam-btn {
    background: linear-gradient(135deg, #F44336 0%, #d32f2f 100%);
}

.mode-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .subject-selection-grid,
    .chapter-grid,
    .topic-grid,
    .test-mode-grid {
        grid-template-columns: 1fr;
    }
    
    .test-mode-card {
        padding: 2rem;
    }
}


			/* Papers Selection */
			.papers-section {
				display: none;
				padding: 120px 0 80px;
				background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
				color: white;
				min-height: 100vh;
			}

			.papers-section.active {
				display: block;
			}

			 .papers-header {
            text-align: center;
            margin-bottom: 4rem;
        	}
        
        .papers-title {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            letter-spacing: 2px;
        }	

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

			.paper-card {
				background: rgba(255, 255, 255, 0.1);
				border: 1px solid rgba(255, 255, 255, 0.2);
				padding: 2rem;
				border-radius: 15px;
				text-align: center;
				backdrop-filter: blur(10px);
            	transition: all 0.3s ease;
            	position: relative;
            	overflow: hidden;
		
			}

			.paper-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #f093fb, #f5576c);
        }

			.paper-card:hover {
				background: rgba(255, 255, 255, 0.2);
				transform: translateY(-5px);
			}

			.paper-start-btn {
				background: #667eea;
				color: white;
				border: none;
				padding: 1rem 2rem;
				border-radius: 10px;
				font-weight: bold;
				cursor: pointer;
				transition: all 0.3s ease;
				margin-top: 1rem;
			}

			.paper-start-btn:hover {
            background: rgb(63, 138, 103);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

			/* Exam Interface - FIXED */
			.exam-interface {
				display: none;
				min-height: 100vh;
				background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
				padding: 0;
				position: relative;
				z-index: 1;
			}

			.exam-interface.active {
				display: block;
				position: fixed;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				z-index: 10000;
				overflow-y: auto;
			}

			.exam-header {
				background: rgba(255, 255, 255, 0.1);
				backdrop-filter: blur(10px);
				-webkit-backdrop-filter: blur(10px);
				padding: 0.8rem 0;
				border-bottom: 1px solid rgba(255, 255, 255, 0.2);
				position: sticky;
				top: 0;
				z-index: 10001;
			}

			.exam-nav {
				display: flex;
				justify-content: space-between;
				align-items: center;
				max-width: 1400px;
				margin: 0 auto;
				padding: 0 2rem;
				color: white;
				gap: 1.5rem;
				flex-wrap: wrap;
			}

			.exam-info {
				display: flex;
				flex-direction: column;
				gap: 0.3rem;
				flex: 1;
				min-width: 200px;
			}

			.exam-title {
				font-size: 1.1rem;
				font-weight: 700;
				margin: 0;
			}

			.exam-actions {
				display: flex;
				gap: 0.8rem;
				align-items: center;
				flex-wrap: wrap;
				justify-content: flex-end;
				flex-shrink: 0;
			}

			/* Better contrast for metadata on gradient header */
			.exam-header .exam-metadata{
				color: rgba(255,255,255,0.9) !important;
				font-size: 0.8rem;
				line-height: 1.3;
				opacity: 0.95;
			}

			.exam-counter {
				background: rgba(255, 255, 255, 0.18);
				padding: 0.4rem 0.8rem;
				border-radius: 18px;
				font-size: 0.8rem;
				color: #fff;
				white-space: nowrap;
			}
			
			.timer {
				background: rgba(255, 255, 255, 0.18);
				padding: 0.4rem 0.8rem;
				border-radius: 18px;
				font-family: 'Courier New', monospace;
				font-size: 0.9rem;
				font-weight: 600;
				white-space: nowrap;
			}

			/* Make action pills consistent height and alignment */
			.exam-actions > *{
				display: inline-flex;
				align-items: center;
				justify-content: center;
				height: auto;
				padding: 0.5rem 1rem;
			}

			.exit-btn {
				background: #ff4757;
				color: white;
				border: none;
				padding: 0.7rem 1.5rem;
				border-radius: 25px;
				cursor: pointer;
				font-weight: bold;
				transition: all 0.3s ease;
			}
			.exit-btn:hover {
				background: #ff3838;
				transform: translateY(-2px);
			}

			/* Toggle Palette Button in Header */
			.exam-actions .toggle-palette-btn {
				background: rgba(255, 255, 255, 0.15);
				border: 1px solid rgba(255, 255, 255, 0.3);
				color: white;
				padding: 0.6rem 1.2rem;
				border-radius: 20px;
				cursor: pointer;
				font-weight: 600;
				font-size: 0.9rem;
				transition: all 0.3s ease;
				white-space: nowrap;
			}

			.exam-actions .toggle-palette-btn:hover {
				background: rgba(255, 255, 255, 0.25);
				transform: scale(1.05);
				border-color: rgba(255, 255, 255, 0.5);
			}

			.exam-actions .toggle-palette-btn:active {
				transform: scale(0.95);
			}
						/* ============================================ */
			/* FIXED EXAM CONTENT LAYOUT */
			/* ============================================ */
			.exam-content {
				display: flex;
				max-width: 1400px;
				margin: 0 auto;
				min-height: calc(100vh - 100px);
				gap: 2rem;
				padding: 2rem;
			}

			.question-panel {
				flex: 1;
				background: white;
				border-radius: 15px;
				padding: 2rem;
				box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
				display: flex;
				flex-direction: column;
				gap: 1.5rem;
			}

			.question-number {
            color: #667eea;
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 0;
        }

			.question-text {
				font-size: 1rem;
				line-height: 1.6;
				color: #333;
				word-wrap: break-word;
				overflow-wrap: break-word;
			}

			/* Container for question media (images) */
			#question-media {
				display: flex;
				justify-content: center;
				align-items: center;
				margin: 1.5rem 0;
				padding: 1rem;
				background: #f8f9fa;
				border-radius: 10px;
				border: 1px solid #e0e6ed;
			}

			.question-media img,
			.paper-q-image,
			.question-inline-image {
				max-width: 100%;
				max-height: 350px;
				width: auto;
				height: auto;
				display: block;
				border-radius: 8px;
				object-fit: contain;
			}

			.options-list {
				list-style: none;
				padding: 0;
				margin: 0;
				display: grid;
				grid-template-columns: 1fr 1fr;
				gap: 1rem;
			}

			.option-item {
				margin-bottom: 0;
				padding: 1.2rem;
				border: 2px solid #e0e6ed;
				border-radius: 10px;
				cursor: pointer;
				transition: all 0.3s ease;
				display: flex;
				align-items: center;
				font-size: 0.95rem;
				min-height: 60px;
				background: white;
			}

			.option-item:hover {
				border-color: #667eea;
				background: #f8f9ff;
				transform: translateY(-2px);
				box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
			}

			.option-item.selected {
				border-color: #667eea;
				background: #667eea;
				color: white;
				box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
			}

			.option-label {
            	font-weight: 700;
            	margin-right: 0.8rem;
            	min-width: 30px;
       		}

			.question-controls {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding-top: 1.5rem;
				border-top: 2px solid #e0e6ed;
				gap: 1rem;
				flex-wrap: wrap;
				margin-top: auto;
			}

			.nav-btn {
				padding: 0.7rem 1.5rem;
				border: 2px solid #667eea;
				background: white;
				color: #667eea;
				border-radius: 25px;
				cursor: pointer;
				font-weight: 600;
				transition: all 0.3s ease;
				
			}

			.nav-btn:hover:not(:disabled) {
				background: #667eea;
				color: white;
			}

			.nav-btn:disabled {
				opacity: 0.5;
				cursor: not-allowed;
			}

			.ai-solution-btn {
				background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
				color: white;
				border: none;
				padding: 0.7rem 1.5rem;
				border-radius: 25px;
				cursor: pointer;
				font-weight: 600;
				transition: all 0.3s ease;
				white-space: nowrap;
			}

			.ai-solution-btn:hover {
				transform: translateY(-2px);
				box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
			}
			/* ============================================ */
			/* FIXED QUESTION PALETTE */
			/* ============================================ */
      .question-palette {
        width: 300px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 2rem;
        margin: 2rem 2rem 2rem 0;
        border-radius: 15px;
        transition: all 0.3s ease;
        color: white;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        /* allow the palette to size itself but cap to viewport */
        height: auto;
        position: sticky;
        /* leave some room for header (adjust if your header height differs) */
        top: 100px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        /* smooth native scrolling on iOS */
        -webkit-overflow-scrolling: touch;
      }

			.question-palette.hidden{
				display: none;
			}

			.palette-header {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 1rem;
			}

			.question-palette h4 {
				margin: 0;
				font-size: 1.2rem;
				text-align: left;
				flex: 1;
			}

			.toggle-palette-btn {
				background: rgba(255, 255, 255, 0.2);
				border: 1px solid rgba(255, 255, 255, 0.3);
				color: white;
				padding: 0.4rem 0.8rem;
				border-radius: 6px;
				font-size: 0.8rem;
				cursor: pointer;
				transition: all 0.3s ease;
				white-space: nowrap;
			}

			.toggle-palette-btn:hover {
				background: rgba(255, 255, 255, 0.3);
				transform: scale(1.05);
			}

			.question-grid {
				display: grid;
				grid-template-columns: repeat(5, 1fr);
				gap: 0.5rem;
				margin-bottom: 1rem;
			}

			.question-bubble {
				width: 45px;
				height: 45px;
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;
				cursor: pointer;
				font-weight: 600;
				transition: all 0.3s ease;
				background: rgba(255, 255, 255, 0.15);
				color: white;
				border: 2px solid transparent;
				font-size: 0.85rem;
			}

			.question-bubble:hover {
				background: rgba(255, 255, 255, 0.3);
				transform: scale(1.1);
			}

			.question-bubble.current {
				background: #667eea;
				color: white;
				border-color: white;
				box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
			}

			.question-bubble.answered {
				background: #4caf50;
				color: white;
			}

			.question-bubble.answered:hover {
				background: #45a049;
			}

			.question-bubble.marked {
				background: #ff9800;
				color: white;
			}

      /* Visited but not answered -> show as unanswered (red) */
      .question-bubble.unanswered {
        background: #ef5350;
        color: white;
      }

      .question-bubble.unanswered:hover {
        background: #e53935;
      }

			.question-bubble.marked:hover {
				background: #e68900;
			}

			.question-bubble.not-visited {
				background: rgba(255, 255, 255, 0.1);
				color: #ccc;
			}

			.palette-stats {
				margin-top: 1rem;
				padding-top: 1rem;
				border-top: 1px solid rgba(255, 255, 255, 0.2);
				font-size: 0.9rem;
			}

			.palette-stats div {
				display: flex;
				justify-content: space-between;
				margin-bottom: 0.5rem;
				align-items: center;
			}

			.stat-indicator {
				width: 20px;
				height: 20px;
				border-radius: 50%;
				display: inline-block;
				margin-right: 0.5rem;
			}

			.stat-indicator.answered {
				background: #4caf50;
			}

			.stat-indicator.marked {
				background: #ff9800;
			}

			.stat-indicator.visited {
				background: rgba(255, 255, 255, 0.3);
			}
						/* AI Solution Modal */
			.ai-solution-modal {
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.8);
				z-index: 2000;
				overflow-y: auto;
			}

			.ai-solution-content {
				background: white;
				margin: 2rem auto;
				padding: 2rem;
				border-radius: 15px;
				max-width: 800px;
				position: relative;
			}

			.solution-header {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 1rem;
				border-bottom: 2px solid #f0f0f0;
				padding-bottom: 1rem;
			}

			.solution-title {
				font-size: 1.5rem;
				color: #667eea;
				font-weight: 600;
			}

			.close-solution {
				background: none;
				border: none;
				font-size: 2rem;
				color: #999;
				cursor: pointer;
			}

			.solution-body {
				line-height: 1.8;
				font-size: 1.1rem;
			}

			.solution-step {
				margin-bottom: 1.5rem;
				padding: 1rem;
				background: #f8f9ff;
				border-left: 4px solid #667eea;
				border-radius: 5px;
			}
			.sidebar {
				width: 300px;
				background: rgba(255, 255, 255, 0.1);
				backdrop-filter: blur(10px);
				padding: 2rem;
				margin: 2rem 2rem 2rem 0;
				border-radius: 15px;
				transition: all 0.3s ease;
			}

			.sidebar.hidden {
				display: none;
			}

			.sidebar h3 {
				color: white;
				margin-bottom: 1rem;
				font-size: 1.2rem;
			}
			.sidebar-stats {
				color: white;
				font-size: 0.9rem;
			}

			.stat-row {
				display: flex;
				justify-content: space-between;
				margin-bottom: 0.5rem;
				padding: 0.3rem 0;
			}

			/* Other sections */
			.subjects {
				padding: 80px 0;
			}

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

			.subject-card {
				background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
				color: white;
				padding: 2rem;
				border-radius: 15px;
				text-align: center;
				transition: transform 0.3s ease;
			}

			.subject-card:hover {
				transform: scale(1.05);
			}

			.subject-icon {
				font-size: 3rem;
				margin-bottom: 1rem;
			}

			.how-it-works {
				padding: 80px 0;
				background: #f8f9fa;
			}

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

			.step {
				background: white;
				padding: 2rem;
				border-radius: 15px;
				text-align: center;
				position: relative;
				box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
			}

			.step-number {
				position: absolute;
				top: -15px;
				left: 50%;
				transform: translateX(-50%);
				background: #667eea;
				color: white;
				width: 40px;
				height: 40px;
				border-radius: 50%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-weight: bold;
				font-size: 1.2rem;
			}

			.step h3 {
				margin: 1.5rem 0 1rem;
				color: #333;
			}

			.about {
				padding: 80px 0;
			}

			.about-content {
				display: grid;
				grid-template-columns: 1fr 1fr;
				gap: 4rem;
				align-items: center;
			}

			.about-text {
				font-size: 1.1rem;
				line-height: 1.8;
			}

			.about-image {
				text-align: center;
				font-size: 8rem;
			}

			footer {
				background: #333;
				color: white;
				padding: 40px 0 20px;
				text-align: center;
			}

			.footer-content {
				display: grid;
				grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
				gap: 2rem;
				margin-bottom: 2rem;
			}

			.footer-section h3 {
				margin-bottom: 1rem;
				color: #667eea;
			}

			.footer-section ul {
				list-style: none;
			}

			.footer-section ul li {
				margin-bottom: 0.5rem;
			}

			.footer-section ul li a {
				color: #ccc;
				text-decoration: none;
				transition: color 0.3s ease;
			}

			.footer-section ul li a:hover {
				color: #ffd700;
			}
			/* Loading */
			.loading {
            	display: inline-block;
            	width: 20px;
            	height: 20px;
            	border: 3px solid #f3f3f3;
            	border-top: 3px solid #667eea;
            	border-radius: 50%;
            	animation: spin 1s linear infinite;
        }
			.loading-overlay {
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.5);
				justify-content: center;
				align-items: center;
				z-index: 9999;
			}

			.loading-spinner {
				width: 50px;
				height: 50px;
				border: 5px solid rgba(255, 255, 255, 0.3);
				border-top: 5px solid white;
				border-radius: 50%;
				animation: spin 1s linear infinite;
			}

			@keyframes spin {
				0% {
					transform: rotate(0deg);
				}
				100% {
					transform: rotate(360deg);
				}
			}

			.message {
				position: fixed;
				top: 100px;
				left: 50%;
				transform: translateX(-50%);
				padding: 1rem 2rem;
				border-radius: 8px;
				color: white;
				font-weight: bold;
				z-index: 10000;
				max-width: 80%;
			}

			.message.success {
				background: #4caf50;
			}

			.message.error {
				background: #f44336;
			}
		
			/* Responsive Design */
			@media (max-width: 768px) {
				.nav-menu {
					position: fixed;
					left: -100%;
					top: 70px;
					flex-direction: column;
					background-color: rgba(102, 126, 234, 0.95);
					backdrop-filter: blur(10px);
					width: 100%;
					text-align: center;
					transition: 0.3s;
					box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
					padding: 2rem 0;
					gap: 1rem;
				}

				.nav-menu.active {
					left: 0;
				}

				.mobile-menu-toggle {
					display: flex;
				}

				.hero h1 {
					font-size: 2.5rem;
				}

				.hero p {
					font-size: 1.1rem;
				}

				.section-title {
					font-size: 2rem;
				}

				.about-content {
					grid-template-columns: 1fr;
					gap: 2rem;
					text-align: center;
				}

				.about-image {
                order: -1;
                font-size: 6rem;
            	}

				.features-grid,
            	.subjects-grid,
            	.steps-container {
                grid-template-columns: 1fr;
            	}

				 nav {
                padding: 0 1rem;
            	}
            
            	.container {
                padding: 0 1rem;
            	}

				.exam-cards-container {
					grid-template-columns: 1fr;
					gap: 1.5rem;
				}

				.exam-content {
					flex-direction: column;
				}

				.exam-card {
					min-height: auto;
					padding: 2rem;
				}

				.exam-cards-grid {
					grid-template-columns: 1fr;
					gap: 1.5rem;
				}

				.exam-card {
					padding: 2rem;
				}

				.exam-nav {
					flex-direction: column;
					gap: 1rem;
				}
				.exam-actions {
					justify-content: center;
					width: 100%;
				}

				.timer {
					flex: 1;
					min-width: auto;
				}

				.exit-btn {
					flex: 1;
				}
				.question-controls {
					flex-direction: column;
					align-items: stretch;
				}

				.question-controls > div {
					width: 100%;
					display: flex;
					gap: 0.5rem;
				}

				.nav-btn,
				.ai-solution-btn {
					flex: 1;
					padding: 0.8rem 1rem;
					font-size: 0.9rem;
				}

				.question-content {
					flex-direction: column;
				}

				.sidebar {
					width: auto;
					margin: 0 2rem 2rem;
					order: -1;
				}

				.question-grid {
					grid-template-columns: repeat(5, 1fr);
				}

				.question-bubble {
					width: 40px;
					height: 40px;
					font-size: 0.9rem;
				}
			}

			@media (max-width: 1024px) {
				.exam-content {
					flex-direction: column-reverse;
					padding: 1rem;
				}

				.question-palette {
					width: 100%;
					position: static;
					margin-bottom: 1rem;
					max-height: none;
				}

				.question-grid {
					grid-template-columns: repeat(10, 1fr);
				}
			}

			/* Tablet responsive - Hide palette button, show always */
			@media (max-width: 768px) {
				.toggle-palette-btn {
					display: none;
				}

				.exam-actions {
					gap: 0.8rem;
					flex-wrap: wrap;
				}

				.question-palette {
					width: 100%;
					margin: 1rem 0;
					padding: 1.5rem;
				}

				.question-grid {
					grid-template-columns: repeat(8, 1fr);
					gap: 0.4rem;
				}

				.question-bubble {
					width: 40px;
					height: 40px;
					font-size: 0.75rem;
				}

				.palette-stats {
					margin-top: 1rem;
					font-size: 0.85rem;
				}

				.exam-content {
					padding: 1rem 0.5rem;
				}

				.exam-questions {
					padding: 1rem 0.5rem;
				}

				.exam-actions button {
					padding: 0.5rem 0.8rem;
					font-size: 0.85rem;
				}
			}

			/* Mobile responsive - Compact palette, single column layout */
			@media (max-width: 640px) {
				.exam-wrapper {
					flex-direction: column;
				}

				.exam-content {
					flex-direction: column;
					padding: 0.5rem;
				}

				.exam-actions {
					gap: 0.5rem;
					flex-wrap: wrap;
				}

				.exam-actions button {
					padding: 0.5rem 0.8rem;
					font-size: 0.8rem;
				}

				.exam-actions .toggle-palette-btn {
					padding: 0.5rem 0.8rem;
					font-size: 0.8rem;
					display: inline-flex;
				}

				.timer {
					padding: 0.4rem 0.8rem;
					font-size: 0.95rem;
				}

				.question-palette {
          width: 100%;
          position: static;
          margin: 0;
          padding: 1rem;
          border-radius: 10px;
          /* allow the palette to use a percentage of viewport on mobile */
          max-height: 50vh;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
				}

				.question-palette.hidden {
					display: none;
					max-height: 0;
				}

				.palette-header {
					margin-bottom: 0.5rem;
				}

				.palette-header .toggle-palette-btn {
					display: inline-flex;
					padding: 0.3rem 0.6rem;
					font-size: 0.75rem;
				}

				.question-palette h4 {
					font-size: 1rem;
				}

				.question-grid {
					grid-template-columns: repeat(6, 1fr);
					gap: 0.3rem;
					margin-bottom: 0.5rem;
				}

				.question-bubble {
					width: 35px;
					height: 35px;
					font-size: 0.7rem;
					border-radius: 50%;
				}

				.palette-stats {
					font-size: 0.8rem;
					margin-top: 0.5rem;
					padding-top: 0.5rem;
				}

				.palette-stats div {
					margin-bottom: 0.3rem;
				}

				.exam-questions {
					width: 100%;
					padding: 0.5rem;
				}

				.question-container {
					padding: 1rem 0.5rem;
					border-radius: 10px;
				}

				.option {
					padding: 0.8rem;
					margin: 0.5rem 0;
					font-size: 0.9rem;
				}

				.btn-group {
					flex-direction: column;
					gap: 0.5rem;
				}

				.btn-group button {
					width: 100%;
					padding: 0.8rem;
					font-size: 0.9rem;
				}
			}

			/* Small mobile - Extra compact */
			@media (max-width: 480px) {
        .whatsapp-banner {
                padding: 0.6rem 0;
            }

            .banner-content {
                padding: 0.6rem 0.8rem;
                gap: 0.5rem;
            }

            .whatsapp-icon {
                width: 20px;
                height: 20px;
            }

            .banner-text {
                font-size: 0.8rem;
                line-height: 1.4;
            }

            .join-whatsapp-btn {
                padding: 0.4rem 0.8rem;
                font-size: 0.75rem;
                gap: 0.3rem;
            }

            .whatsapp-logo {
                width: 16px;
                height: 16px;
            }

            .header-container {
                padding: 0 0.8rem;
                flex-direction: row;
            }

            .logo {
                font-size: 1.4rem;
            }

            .mobile-menu-toggle {
                display: flex;
                gap: 4px;
            }

            .mobile-menu-toggle span {
                width: 20px;
                height: 2.5px;
            }

            nav.nav-menu {
                top: 280px;
                padding: 1.5rem 0;
                gap: 0.8rem;
            }

            nav a {
                font-size: 0.9rem;
                padding: 0.4rem 0;
            }

            .header-btn {
                padding: 0.5rem 1rem;
                font-size: 0.85rem;
            }

            .hero h1 {
                font-size: 1.5rem;
            }

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

            .cta-button {
                padding: 0.8rem 1.5rem;
                font-size: 1rem;
            }

            .test-title {
                font-size: 1.1rem;
            }

            .stat-number {
                font-size: 1.5rem;
            }

            .section-header h2 {
                font-size: 1.5rem;
            }

            header {
                top: 180px;
            }
        }

        /* ===== ANIMATIONS ===== */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .test-card,
        .feature-card,
        .stat-box {
            animation: fadeInUp 0.6s ease forwards;
        }

        .test-card:nth-child(1) { animation-delay: 0.1s; }
        .test-card:nth-child(2) { animation-delay: 0.2s; }
        .test-card:nth-child(3) { animation-delay: 0.3s; }
        .test-card:nth-child(4) { animation-delay: 0.4s; }
        
				.hero {
                padding: 100px 0 60px;
            	}
            
            	.hero h1 {
                font-size: 2rem;
            	}
            
            	.cta-button {
                padding: 12px 24px;
                font-size: 1rem;
            	}
            
            	.feature-card,
            	.step,
            	.subject-card {
                padding: 1.5rem;
            	}
            
            	.features,
            	.subjects,
            	.how-it-works,
            	.about {
                padding: 60px 0;
            	}
				
				.exam-card {
					padding: 1.5rem;
				}

				.exam-icon {
					font-size: 3rem;
				}

				.exam-card h3 {
					font-size: 1.5rem;
				}

				.question-panel {
					padding: 1.5rem;
				}

				.question-text {
					font-size: 1rem;
				}

				.option-item {
					padding: 0.8rem;
					font-size: 0.95rem;
				}

				.question-palette {
					padding: 1.5rem;
				}
			
		/* ============================================ */
		/* MEGA MENU STYLES */
		/* ============================================ */
		.nav-item {
			position: relative;
			display: inline-block;
		}

		.nav-item.has-submenu {
			position: relative;
		}

		.nav-item .nav-link {
			display: inline-block;
			color: #ffd700;
			text-decoration: none;
			font-weight: 600;
			padding: 0.5rem 1rem;
			cursor: pointer;
			transition: all 0.3s ease;
			border-radius: 8px;
			position: relative;
		}

		.nav-item .nav-link:hover {
			color: #fff;
			background: rgba(255, 255, 255, 0.1);
			transform: translateY(-2px);
		}

		.nav-item .nav-link::after {
			content: '';
			position: absolute;
			bottom: 0;
			left: 50%;
			transform: translateX(-50%) scaleX(0);
			width: 80%;
			height: 2px;
			background: #ffd700;
			transition: transform 0.3s ease;
		}

		.nav-item .nav-link:hover::after {
			transform: translateX(-50%) scaleX(1);
		}

		/* Mega Menu - two-panel layout (left categories + right panel) */
		/* Container */
		.mega-menu {
			position: absolute;
			top: 100%;
			left: 0;
			background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
			min-width: 900px;
			border-radius: 10px;
			box-shadow: 0 12px 40px rgba(0,0,0,0.35);
			padding: 0.8rem;
			margin-top: 0.4rem;
			display: none;
			z-index: 1000;
			border: 1px solid rgba(255,255,255,0.06);
			opacity: 0;
			transform: translateY(-8px);
			transition: all 0.25s ease;
		}

		.nav-item.has-submenu:hover .mega-menu {
			display: block;
			opacity: 1;
			transform: translateY(0);
		}

		/* allow programmatic opening via .active class (click-to-open) */
		.nav-item.has-submenu.active .mega-menu {
			display: block;
			opacity: 1;
			transform: translateY(0);
		}

		/* Inner layout: left categories + right details */
		.mega-inner {
			display: flex;
			align-items: stretch;
			gap: 1rem;
			min-height: 320px;
		}

		.mega-left {
			width: 260px;
			background: rgba(255,255,255,0.03);
			border-radius: 8px;
			overflow: hidden;
			padding: 0.6rem;
		}

		.mega-left ul { list-style: none; margin: 0; padding: 0; }
		.mega-left li { margin: 0.25rem 0; }

		.mega-left-item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0.6rem 0.8rem;
			color: #fff;
			cursor: pointer;
			border-radius: 6px;
			transition: background 0.15s ease, color 0.15s ease;
			font-weight: 600;
		}

		.mega-left-item:hover,
		.mega-left-item.active {
			background: rgba(102,126,234,0.25);
			color: #ffd700;
		}

		.mega-right {
			flex: 1 1 auto;
			padding: 0.8rem 1rem;
			background: transparent;
			overflow: auto;
		}

		.mega-panel { display: none; }
		.mega-panel.active { display: block; }

		.mega-panel .mega-title { color: #ffd700; font-weight: 700; margin-bottom: 0.6rem; }
		.mega-panel ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.35rem; }
		.mega-panel li { margin: 0; }
		.mega-panel a { display:block; padding: 0.45rem 0.6rem; color: #fff; text-decoration: none; border-radius:6px; transition: all 0.15s; }
		.mega-panel a:hover { background: rgba(255,255,255,0.1); color: #ffd700; padding-left: 0.9rem; }

		/* Subjects panel columns */
		.subject-columns { display: flex; gap: 1rem; align-items: flex-start; }
		.subject-col { flex: 1 1 180px; min-width: 160px; }
		.subject-col h4 { color: rgba(255,255,255,0.95); margin-bottom: 0.6rem; font-size: 1rem; }
		.subject-col ul { list-style: none; margin: 0; padding: 0; }
		.subject-col ul li { margin: 0.35rem 0; }
		.subject-col a { color: rgba(255,255,255,0.92); text-decoration: none; font-weight: 600; display: block; padding: 0.25rem 0.35rem; border-radius: 6px; }
		.subject-col a:hover { color: #ffd700; background: rgba(255,255,255,0.03); padding-left: 0.6rem; }

		/* Subjects inner structure - left nav + right panels */
		.subjects-inner { display: flex; gap: 1.2rem; align-items: stretch; }
		.subjects-left { width: 200px; flex-shrink: 0; }
		.subjects-left ul { list-style: none; margin: 0; padding: 0; }
		.subjects-left li { margin: 0; }
		.subject-nav-item { display: block; padding: 0.6rem 0.8rem; color: #fff; cursor: pointer; border-radius: 6px; transition: all 0.15s ease; font-weight: 500; border-left: 3px solid transparent; }
		.subject-nav-item:hover { background: rgba(102,126,234,0.25); color: #ffd700; border-left-color: #ffd700; }
		.subject-nav-item.active { background: rgba(102,126,234,0.3); color: #ffd700; border-left-color: #ffd700; font-weight: 600; }
		
		.subjects-right { flex: 1 1 auto; }
		.subject-panel { display: none; }
		.subject-panel.active { display: block; }
		.subject-panel .mega-title { color: #ffd700; font-weight: 700; margin-bottom: 0.8rem; font-size: 1rem; }
		.subject-panel ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.4rem; }
		.subject-panel li { margin: 0; }
		.subject-panel a { display: block; padding: 0.5rem 0.7rem; color: #fff; text-decoration: none; border-radius: 6px; transition: all 0.15s; font-size: 0.93rem; }
		.subject-panel a:hover { background: rgba(102,126,234,0.3); color: #ffd700; padding-left: 1rem; }

		.mega-footer {
			border-top: 1px solid rgba(255,255,255,0.06);
			padding-top: 0.8rem;
			margin-top: 0.6rem;
			font-size: 0.88rem;
			color: rgba(255,255,255,0.7);
			text-align: center;
		}

		/* Responsive behavior */
		@media (max-width: 1024px) {
			.mega-menu { min-width: 760px; }
			.mega-left { width: 220px; }
		}

		@media (max-width: 768px) {
			/* collapse to vertical block on mobile */
			.mega-menu { position: static; display: none; min-width: auto; padding: 0.6rem; border-radius: 8px; box-shadow: none; transform: none; opacity: 1; }
			.nav-item.has-submenu.active .mega-menu { display: block; }
			.mega-inner { flex-direction: column; }
			.mega-left { width: 100%; display: block; }
			.mega-right { width: 100%; }
			.mega-panel ul { grid-template-columns: repeat(2, 1fr); }
		}

		@media (max-width: 480px) {
			.mega-panel ul { grid-template-columns: 1fr; }
		}

/* Subjects nested left/right inside the subjects panel */
.subjects-inner {
	display: flex;
	gap: 18px;
	padding: 12px 8px;
}
.subjects-left {
	width: 180px;
	border-right: 1px solid rgba(0,0,0,0.06);
}
.subjects-left ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.subject-nav-item {
	padding: 10px 12px;
	cursor: pointer;
	color: #333;
	border-radius: 4px;
}
.subject-nav-item:hover,
.subject-nav-item.active {
	background: #f5f7fa;
	color: #1e3c72;
	font-weight: 700;
}
.subjects-right {
	flex: 1;
	min-width: 280px;
}
.subject-panel { display: none; }
.subject-panel.active { display: block; }

@media (max-width: 880px) {
	.subjects-inner { flex-direction: column; }
	.subjects-left { width: 100%; border-right: none; }
}

		/* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .feature-card,
        .step,
        .subject-card {
            animation: fadeInUp 0.6s ease forwards;
        }
        
        /* Smooth Scrolling */
        html {
            scroll-behavior: smooth;
        }/*
  #upload-progress { width:100%; height:10px; background:#eee; border-radius:6px; overflow:hidden; margin-top:8px; display:none; }
  #upload-progress > .bar { height:100%; width:0%; background:linear-gradient(90deg,#667eea,#764ba2); transition:width 120ms; }
  .small-muted { font-size:0.9rem; color:#666; margin-top:6px; }*/

