/* style.css - All CSS extracted from the HTML */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    padding-top: 80px;
}

/* Modern Navbar */
.navbar {
    background: #ffffff;
    backdrop-filter: blur(20px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

     .logo img {
    height: 110px;
width: 300px;
    transition: transform 0.3s ease;
    background: transparent;
  }
.logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Login Popup Styles */
.login-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.login-popup-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: popup-appear 0.3s ease-out;
}

@keyframes popup-appear {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.login-popup h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.login-popup p {
    margin-bottom: 20px;
    color: var(--gray);
}

.login-popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.login-btn {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.register-btn {
    padding: 12px 25px;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.register-btn:hover {
    background: #0da271;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
}

.close-popup:hover {
    color: var(--danger);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.test-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.test-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.test-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.timer-container {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Progress Container */
.progress-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary);
}

/* Success Messages */
.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #a7f3d0;
    font-weight: 500;
}

.score-message {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.band-score {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 1rem 0;
    font-weight: 800;
}

/* Section Layout */
.section-container {
    margin-bottom: 2rem;
}

/* Headers */
h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary);
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--dark);
    font-weight: 600;
}

/* Instructions */
.instructions {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

.instructions p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Questions */
.question {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    background: #f8fafc;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.question:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.question p {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Locked Questions */
.question.locked {
    opacity: 0.7;
    border-left-color: var(--danger);
    position: relative;
}

.question.locked::after {
    content: "🔒";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 10px;
    z-index: 10;
    transition: all 0.3s ease;
}

.locked-overlay:hover {
    background: rgba(255, 255, 255, 0.95);
}

.locked-text {
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Answer Inputs */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.answer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answer-item input {
    width: 50px;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.answer-item input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Options */
.options {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option:hover {
    background: #f1f5f9;
}

.option input {
    cursor: pointer;
}

/* MCQ Options */
.mcq-options {
    margin-top: 1rem;
}

.mcq-option {
    margin-bottom: 0.8rem;
}

/* Flowchart */
.flowchart {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.flowchart-step {
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    background: white;
    border-radius: 10px;
    position: relative;
}

.flowchart-arrow {
    text-align: center;
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--primary);
}

.flowchart-step input {
    width: 200px;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.flowchart-step input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Answer Sheet */
.answer-sheet {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 2px solid var(--border);
}

/* Final Answer Sheet */
.final-answer-sheet {
    background: white;
    border: 3px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.final-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.final-answer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    position: relative;
    transition: all 0.3s ease;
}

.final-answer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.question-number {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark);
}

.user-answer {
    font-size: 1.1rem;
    min-height: 24px;
    font-weight: 700;
}

.correct-answer {
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 0.3rem;
}

.incorrect {
    color: var(--danger);
}

.correct {
    color: var(--success);
}

.answer-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.correct-dot {
    background-color: var(--success);
}

.incorrect-dot {
    background-color: var(--danger);
}

/* Band Score Table */
.band-score-table {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.band-score-table h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.3rem;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

.score-table th, .score-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.score-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.score-table tr:nth-child(even) {
    background: #f8fafc;
}

.score-table tr:hover {
    background: #f1f5f9;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 1.5rem;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.btn-submit {
    background: var(--success);
}

.btn-submit:hover {
    background: #0da271;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Audio Player Styles */
.audio-player-container {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid var(--primary);
}

.audio-player {
    width: 100%;
    margin-top: 1rem;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.audio-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.audio-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.audio-btn:active {
    transform: translateY(0);
}

.play-btn {
    background: var(--success);
}

.play-btn:hover {
    background: #0da271;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.pause-btn {
    background: var(--danger);
}

.pause-btn:hover {
    background: #e74c3c;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.audio-time {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
}

.audio-progress {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.volume-slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.listening-instructions {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--accent);
}

.section-divider {
    border-top: 2px dashed #e2e8f0;
    margin: 2rem 0;
    padding-top: 2rem;
}

.section-title {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table Styles */
.question-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.question-table th {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
    background: #f8f9fa;
    font-weight: 600;
}

.question-table td {
    padding: 12px;
    border: 1px solid var(--border);
    vertical-align: top;
}

.question-table input {
    width: 100px;
    padding: 6px;
    border: 2px solid var(--border);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.question-table input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Form Container */
.form-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary);
}

.form-container h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 1rem 0;
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
    }

    .hamburger span {
        width: 100%;
        height: 3px;
        background: var(--dark);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (max-width: 768px) {
    .test-header h1 {
        font-size: 1.8rem;
    }

    .timer-container {
        position: static;
        transform: none;
        margin-top: 1rem;
        display: inline-block;
    }

    .options {
        flex-direction: column;
        gap: 0.8rem;
    }

    .answer-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .final-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .flowchart-step input {
        width: 150px;
    }

    .navigation {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .score-table {
        font-size: 0.9rem;
    }
    
    .audio-controls {
        justify-content: center;
    }
    
    .audio-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .question-table {
        font-size: 0.9rem;
    }
    
    .question-table input {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .test-header {
        padding: 1.5rem;
    }

    .test-header h1 {
        font-size: 1.5rem;
    }

    .final-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .flowchart-step input {
        width: 120px;
    }
    
    .audio-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .audio-btn {
        justify-content: center;
    }
    
    .question-table input {
        width: 60px;
    }
}