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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-table: #16162a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #2d2d4a;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 50%, #0f0f1a 100%);
    padding: 1rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    z-index: 10;
}

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

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero-content {
    text-align: center;
    padding: 3rem 0;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.hero-tagline {
    font-size: 1.4rem !important;
    font-weight: 700;
    color: #22c55e !important;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem !important;
}

.hero-vision {
    font-size: 1.05rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
    margin-bottom: 2rem !important;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat .num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat span:last-child {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Sections */
.exam-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header span {
    font-size: 2rem;
}

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

/* Tables */
.exam-table {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-table);
}

thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

tr.featured {
    background: rgba(99, 102, 241, 0.1);
}

tr.featured td:first-child {
    border-left: 3px solid var(--primary);
}

tbody tr:last-child td {
    border-bottom: none;
}

.exam-table tbody tr {
    cursor: pointer;
}

/* Mock Button */
.mock-btn {
    background: linear-gradient(135deg, var(--success), #16a34a);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.mock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mock List */
.mock-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-table);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.mock-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.mock-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mock-item-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mock-item-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.mock-item-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.3rem;
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 500;
    transition: transform 0.3s, opacity 0.3s;
}
.scroll-top:hover {
    transform: scale(1.1);
}
.scroll-top.visible {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0.75rem;
        z-index: 200;
    }
    .nav-links.open {
        display: flex;
    }

    .hero-stats {
        gap: 1.5rem;
    }
    .hero-tagline {
        font-size: 1.1rem !important;
    }

    .filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .mock-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* How It Works */
.how-it-works {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.how-it-works h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
}
.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}
.step-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; font-size: 1.3rem; font-weight: 800;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.step-card h3 {
    font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--text);
}
.step-card p {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.5;
}

/* Live Exams */
.live-exams {
    padding: 2rem 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.live-exams h2 {
    font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--text);
}
.live-grid {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1rem;
}
.live-card {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 2rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem; font-weight: 600;
    color: #22c55e;
    display: flex; align-items: center; gap: 0.5rem;
}
.live-dot {
    width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
    animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.live-note {
    font-size: 0.88rem; color: var(--text-muted); margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-card);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding: 0;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}
.footer-brand h3 {
    font-size: 1.3rem; color: var(--text); margin-bottom: 0.5rem;
}
.footer-brand p {
    font-size: 0.95rem; color: #22c55e; font-weight: 600; margin-bottom: 0.3rem;
}
.footer-vision {
    font-size: 0.85rem !important; color: var(--text-muted) !important; font-weight: 400 !important; line-height: 1.5;
}
.footer-links h4 {
    font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem;
}
.footer-links a {
    display: block; color: var(--text-muted); text-decoration: none; font-size: 0.88rem;
    padding: 0.2rem 0; transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center; padding: 1.25rem 2rem;
    border-top: 1px solid var(--border); font-size: 0.85rem;
}

/* Contact Form */
.contact-section {
    padding: 3rem 2rem;
    background: var(--bg);
}
.contact-wrap {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.contact-wrap h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-wrap > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}
.contact-form {
    text-align: left;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.contact-submit {
    display: block;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

.exam-section {
    scroll-margin-top: 80px;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-info span {
    color: var(--text);
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.logout-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.auth-modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border);
    position: relative;
    animation: slideIn 0.3s;
}

.auth-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

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

.auth-modal-content h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
}

.google-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

#emailLoginForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#emailLoginForm input {
    padding: 0.9rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#emailLoginForm input:focus {
    outline: none;
    border-color: var(--primary);
}

#emailLoginForm input::placeholder {
    color: var(--text-muted);
}

.auth-submit-btn {
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* Responsive Auth */
@media (max-width: 768px) {
    .auth-section {
        position: absolute;
        right: 1rem;
    }

    .login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .auth-modal-content {
        padding: 1.5rem;
    }
}

/* History Button */
.history-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.3s;
    font-weight: 600;
}

.history-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* History Modal */
.history-modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 800px;
    /* Wider for history table/cards */
    width: 90%;
    margin: 5% auto;
    border: 1px solid var(--border);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

.history-modal-content h2 {
    color: var(--text);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: var(--bg-table);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-score {
    text-align: right;
}

.score-badge {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid var(--success);
}

.score-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.loading-text {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}

.no-history {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .history-score {
        align-self: flex-end;
        text-align: right;
    }
}