﻿/* ===== VARAD UI GLOBAL STYLES ===== */
:root {
    --primary: #28a745;
    --primary-dark: #1e7e34;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-dark: #1a1a1a;
    --menu-text: #7b2b21;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 18px 40px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 25px 60px rgba(0, 0, 0, 0.18);
    --radius-pill: 60px;
    --radius-card: 24px;
    --transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #eef2ff);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== HEADER (Glass) ===== */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--menu-text);
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .logo span {
        color: var(--primary);
    }

/* Center container for navigation */
.nav-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}

.nav-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}

    .nav-wrapper::-webkit-scrollbar {
        display: none;
    }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 4px 0;
    width: max-content;
}

    .nav a {
        text-decoration: none;
        color: var(--menu-text);
        font-weight: 600;
        padding: 8px 12px;
        border-radius: var(--radius-pill);
        transition: var(--transition);
        position: relative;
        white-space: nowrap;
        font-size: 0.9rem;
    }

        .nav a::after {
            content: '';
            position: absolute;
            left: 12px;
            right: 12px;
            bottom: 4px;
            height: 2px;
            background: var(--primary);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .nav a:hover {
            background: rgba(255, 255, 255, 0.75);
            color: var(--primary);
            transform: translateY(-2px);
        }

            .nav a:hover::after {
                transform: scaleX(1);
            }

/* Login icon */
.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    color: var(--menu-text);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
}

    .login-icon:hover {
        transform: translateY(-3px) scale(1.1);
        background: white;
        color: var(--primary);
        box-shadow: var(--shadow-medium);
    }

/* ===== MAIN CONTENT ===== */
.main {
    flex: 1;
    padding: 40px 0;
}

/* ===== QUIZ CARD ===== */
.quiz-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-medium);
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.question-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.question-number {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.question-text {
    color: #c00; /* red for question */
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.options-container {
    margin: 20px 0;
    padding: 10px 0;
}

.option-item {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .option-item input[type="radio"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
        cursor: pointer;
    }

    .option-item label {
        font-size: 1.1rem;
        color: #0066cc; /* blue for options */
        cursor: pointer;
    }

.explanation-area {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.explanation-correct {
    color: #009933;
    font-weight: 500;
    margin-bottom: 8px;
}

.explanation-detail {
    color: #c30;
    font-weight: 700;
    font-size: 1.1rem;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-right: auto;
}

    .checkboxes label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .checkboxes input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
    }

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: var(--shadow-soft);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-3px) scale(1.05);
        box-shadow: var(--shadow-hover);
    }

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--glass-border);
}

    .btn-secondary:hover {
        background: #f0f0f0;
        transform: translateY(-3px) scale(1.05);
        box-shadow: var(--shadow-medium);
    }

/* ===== EXAM TITLE (VARAD UI, right-aligned, glassmorphic) ===== */
.exam-title-quiz {
    text-align: right; /* Right aligned */
    font-size: clamp(1.25rem, 5vw, 1.6rem);
    font-weight: 700;
    
    
   
    
    /* Animation */
    opacity: 0;
    transform: translateY(-6px);
    animation: fadeSlideIn 0.45s ease-out forwards;
    transition: var(--transition);
}

    .exam-title-quiz:hover {
        transform: translateY(-2px);
    
    }

/* Fade-in animation */
@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .exam-title-quiz {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
        padding: 10px 16px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .exam-title-quiz {
        text-align: center; /* Better for small screens */
        padding: 8px 12px;
        font-size: 1.1rem;
    }
}

@media (min-width: 2000px) {
    .exam-title-quiz {
        font-size: 2rem;
        padding: 20px 28px;
        margin-bottom: 28px;
    }
}


/* ===== FOOTER (Glass) ===== */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    padding: 16px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    flex: 1 1 0;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    justify-content: center;
}

.footer-right {
    justify-content: flex-end;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    color: var(--menu-text);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
    flex-shrink: 0;
}

    .social-icon:hover {
        transform: translateY(-3px) scale(1.1);
        background: white;
        color: var(--primary);
        box-shadow: var(--shadow-medium);
    }

.copyright {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

    .footer-links a {
        text-decoration: none;
        color: var(--menu-text);
        font-weight: 500;
        transition: var(--transition);
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        font-size: 0.9rem;
    }

        .footer-links a:hover {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet (601px - 900px) – everything in one line, nav centered */
@media (min-width: 601px) and (max-width: 900px) {
    .logo {
        font-size: 1.2rem;
    }

    .nav a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .login-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .footer-content {
        gap: 12px;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .copyright {
        font-size: 0.85rem;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

/* Small mobile (max-width: 600px) – two‑line header */
@media (max-width: 600px) {
    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-center {
        flex: 0 0 100%;
        order: 3;
        justify-content: flex-end;
        overflow: visible;
    }

    .nav-wrapper {
        max-width: 100%;
        overflow-x: auto;
    }

    .nav {
        margin-left: auto;
        width: max-content;
        gap: 6px;
    }

    .logo {
        order: 1;
        flex: 1 0 auto;
        font-size: 1.1rem;
    }

    .login-icon {
        order: 2;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .nav a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .quiz-card {
        padding: 20px;
    }

    .action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .checkboxes {
        margin-right: 0;
        align-items: center;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        gap: 8px;
    }

    .footer-links {
        gap: 6px;
    }

        .footer-links a {
            font-size: 0.8rem;
        }

    .copyright {
        font-size: 0.8rem;
    }

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Extra small (max-width: 576px) – further size reductions */
@media (max-width: 576px) {
    .logo {
        font-size: 1rem;
    }

    .nav a {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .login-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .footer-links a {
        font-size: 0.7rem;
    }

    .copyright {
        font-size: 0.7rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Ultra small (max-width: 430px) – ensure all menu items fit without scrolling */
@media (max-width: 430px) {
    .logo {
        font-size: 0.9rem;
    }

    .nav {
        gap: 2px;
    }

        .nav a {
            padding: 4px 5px;
            font-size: 0.65rem;
        }

    .login-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .footer-links a {
        font-size: 0.6rem;
        gap: 3px;
    }

    .copyright {
        font-size: 0.6rem;
    }

    .social-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* Ensure parent <li> can position dropdown */
.nav li {
    position: relative;
}

/* Dropdown hidden by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* show below parent */
    left: 0;
    background: #fff;
    padding: 10px 0;
    list-style: none;
    min-width: 220px;
    border: 1px solid #ddd;
    z-index: 99999; /* VERY IMPORTANT */
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Submenu items */
.dropdown-menu li {
    padding: 6px 15px;
}

    .dropdown-menu li a {
        display: block;
        color: #333;
        text-decoration: none;
    }

        .dropdown-menu li a:hover {
            background: #f5f5f5;
        }


/* Tiny screens (max-width: 360px) – minimal sizes to fit all */
@media (max-width: 360px) {
    .logo {
        font-size: 0.8rem;
    }

    .nav {
        gap: 1px;
    }

        .nav a {
            padding: 3px 4px;
            font-size: 0.55rem;
        }

    .login-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .footer-links a {
        font-size: 0.5rem;
        gap: 2px;
    }

    .copyright {
        font-size: 0.5rem;
    }

    .social-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* For very large screens */
@media (min-width: 1800px) {
    body {
        font-size: 1.3rem;
    }

    .btn {
        transform: scale(1.1);
    }
}
