/* ---------- GLOBAL RESET ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background:  rgb(67, 129, 216);
    min-height: 100vh;
}

/* ---------- NAVBAR ---------- */
/* ================= MODERN NAVBAR ================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background:  rgb(25, 94, 189);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.navbar .logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    transition: 0.3s;
}

/* Underline animation */
.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #60a5fa;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}


.nav-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.6);
} *


/* ---------- HERO SECTION ---------- */
.hero {
    text-align: center;
    padding: 90px 20px 60px;
    color: white;
}

.hero h1 {
    font-size: 2.7rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn {
    background: white;
    color: #1e3a8a;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.btn:hover {
    background: #e0e7ff;
}

/* ---------- CONTAINERS ---------- */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* ---------- HEADINGS ---------- */
.container h2 {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 20px;
}

/* ---------- SUBJECT GRID ---------- */
.subject-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.subject-btn {
    background: #2563eb;
    color: white;
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: 0.3s;
}

.subject-btn:hover {
    background: #1e40af;
}

/* ---------- FOOTER ---------- */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    margin-top: 50px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        margin: 20px;
        padding: 25px;
    }
}


/* ================= AUTH PAGES ================= */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 420px;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #1e3a8a;
}

.auth-card form {
    display: flex;
    flex-direction: column;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

.auth-card input:focus {
    border-color: #2563eb;
    outline: none;
}

.auth-card button {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.auth-card button:hover {
    background: #1e40af;
}

.auth-card p {
    text-align: center;
    margin-top: 15px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px 20px;
    }

    .navbar div:last-child {
        margin-top: 8px;
    }

    .auth-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {

    .auth-wrapper {
        padding: 15px;
    }

    .auth-card {
        padding: 25px 18px;
    }

    .auth-card h2 {
        font-size: 1.4rem;
    }

    .auth-card input {
        font-size: 0.95rem;
    }

    .auth-card button {
        font-size: 0.95rem;
    }
}

/* ================= ADMIN TABLE ================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

thead {
    background: #1e3a8a;
    color: white;
}

th {
    padding: 14px;
    text-align: center;
    font-weight: 600;
}

td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
    background: #f1f5f9;
}

/* Make table scroll on small screens */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}


/* ================= ADMIN FORM ================= */

.admin-section {
    margin-top: 40px;
}

.admin-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e3a8a;
}

.admin-form {
    display: grid;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 90px;
    resize: vertical;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #2563eb;
    outline: none;
}

.admin-form button {
    background: #2563eb;
    color: white;
    padding: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.admin-form button:hover {
    background: #1e40af;
}


/* ================= HERO ================= */

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px;
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-btn {
    background: white;
    color: #1e3a8a;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.hero-btn:hover {
    background: #e0e7ff;
}

/* ================= FEATURES ================= */

.features {
    background:  rgb(67, 129, 216);
    padding: 80px 20px;
    text-align: center;
}

.features h2 {
    margin-bottom: 40px;
    color: #1e3a8a;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: auto;
}

.feature-card {
    background: rgb(125, 167, 225);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* ================= ABOUT ================= */

.about {
    padding: 80px 20px;
    text-align: center;
}

.about-container {
    max-width: 800px;
    margin: auto;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== SIMPLE CONTACT SECTION ===== */

.contact-simple {
    padding: 60px 20px;
    background: rgb(67, 129, 216);
    text-align: center;
}

.contact-box {
    max-width: 600px;
    margin: auto;
}

.contact-simple h2 {
    margin-bottom: 20px;
    color: #dddddd;
}

.contact-simple p {
    margin: 8px 0;
    font-size: 1rem;
}


/* ================= CLEAN RESPONSIVE QUIZ PAGE ================= */

.quiz-hero {
    padding: 80px 20px 60px;
    text-align: center;
    color: white;
}

.quiz-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    animation: fadeUp 0.8s ease;
}

.quiz-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
    animation: fadeUp 1.2s ease;
}

.quiz-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 20px 80px;
}

.quiz-card {
    width: 100%;
    max-width: 900px;
    background: white;
    padding: 50px 40px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    text-align: center;
}

.quiz-card h2 {
    margin-bottom: 40px;
    color: #1e3a8a;
}

.subject-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.subject-grid form {
    margin: 0;
}

.subject-card {
    min-width: 150px;
    padding: 18px 25px;
    border-radius: 14px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    transition: all 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Admin button */
.admin-area {
    margin-top: 45px;
}

.admin-btn-modern {
    padding: 12px 28px;
    border-radius: 30px;
    background: #0f172a;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.admin-btn-modern:hover {
    background: #1e3a8a;
}

/* Logout Button */
.nav-logout {
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    transition: 0.3s;
}

.nav-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= MOBILE FIX ================= */

@media (max-width: 768px) {

    .quiz-card {
        padding: 50px 30px;
    }

    .subject-grid {
        gap: 15px;
    }

    .subject-card {
        width: 100%;
        max-width: 250px;
    }
}
