:root {
    --primary: #1a5f93;
    /* Dark Blue from header */
    --accent: #3498db;
    /* Button Blue */
    --bg-light: #f8fbff;
    --text-dark: #333;
    --success: #2ecc71;
    --error: #e74c3c;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: var(--bg-light);
    color: var(--text-dark);
}

nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 10%;
    background: #fff;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

@media (max-width: 768px) {
    nav {
        padding: 15px 5%;
        justify-content: center;
        text-align: center;
    }
}

.btn {
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
    border-radius: 5px;
}

/* Grid for Modules */
.module-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 50px 10%;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 20px;
}

/* Quiz Styles */
.quiz-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
}

.option {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: left;
    background: white;
}

.option.correct {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.option.wrong {
    background: #f8d7da;
    border-color: var(--error);
    color: #721c24;
}

/* Dashboard Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
}

th,
td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.score-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}








/* AUTHENTICATION PAGES (.page-auth) */
.page-auth {
    background: #e9eef2;
}

.page-auth .container {
    width: 75%;
    margin: 40px auto;
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-auth .left {
    width: 50%;
    background: url('https://images.unsplash.com/photo-1551866442-64e75e911c23') no-repeat center/cover;
    padding: 30px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.page-auth-forgot .left {
    background: url('https://images.unsplash.com/photo-1551866442-64e75e911c23') no-repeat center/cover;
}

.page-auth .left h2 {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    margin: 0;
    text-align: center;
}

.page-auth .right {
    width: 50%;
    padding: 40px;
    box-sizing: border-box;
}

.page-auth .right h1 {
    margin-bottom: 25px;
}

.page-auth .input-group {
    margin-bottom: 20px;
}

.page-auth .input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.page-auth .input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.page-auth .forgot {
    font-size: 14px;
    color: #1e5fa6;
    cursor: pointer;
}

.page-auth .btn-submit {
    width: 100%;
    padding: 12px;
    background: #3b8ec2;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

.page-auth .register-link {
    margin-top: 20px;
    text-align: center;
}

.page-auth .error {
    background: #ffdede;
    color: red;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* REGISTER Specific overrides */
.page-register .container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow like mockup */
    border-radius: 8px;
    /* Slightly squarer corners */
}

.page-register .left {
    background: url('https://images.unsplash.com/photo-1551866442-64e75e911c23') no-repeat center/cover;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    position: relative;
    border-right: 1px solid #f0f0f0;
    /* Optional: border between left and right */
}

.page-register .left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), transparent);
    z-index: 1;
}

.page-register .left h2 {
    background: transparent;
    color: #333;
    font-size: 20px;
    font-weight: 500;
    text-align: left;
    padding: 0;
    margin: 0;
    z-index: 2;
    position: relative;
    line-height: 1.4;
}

.page-register .right h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #111;
}

.page-register .input-group label,
.page-register .group-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.page-register .input-group input {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    transition: 0.3s;
}

.page-register .input-group input::placeholder {
    color: #aaa;
}

.page-register .input-group input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
}

.page-register .role-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.page-register .role-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: white;
    transition: 0.3s;
}

.page-register .role-btn:hover {
    background: #f0f8ff;
}

.page-register .role-btn.active {
    font-weight: 600;
    box-shadow: 0 0 0 1px #3498db;
}

.page-register .btn-submit {
    background: #3498db;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    padding: 14px;
}

.page-register .btn-submit:hover {
    background: #2980b9;
}

.page-register .login-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

.page-register .login-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.page-register .login-link a:hover {
    text-decoration: underline;
}

@media(max-width:900px) {
    .page-auth .container {
        flex-direction: column;
        width: 95%;
        margin: 20px auto;
    }

    .page-auth .left {
        width: 100%;
        min-height: 180px;
        padding: 20px;
    }

    .page-auth .right {
        width: 100%;
        padding: 25px;
    }
}

/* DASHBOARD PAGE (.page-dashboard) */
.page-dashboard {
    background: #f5f7fb;
    display: flex;
}

.page-dashboard .sidebar {
    width: 250px;
    background: white;
    padding: 30px 20px;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.page-dashboard .logo {
    font-size: 28px;
    font-weight: bold;
    color: #1e4f7a;
    margin-bottom: 40px;
}

.page-dashboard .menu-item {
    background: #1e4f7a;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.page-dashboard .profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-dashboard .profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.page-dashboard .main {
    flex: 1;
    padding: 30px 40px;
}

.page-dashboard .topbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-dashboard .nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    color: #666;
}

.page-dashboard .nav-links a {
    text-decoration: none;
    color: #666;
    transition: 0.3s;
}

.page-dashboard .nav-links a:hover {
    color: #1e4f7a;
}

.page-dashboard .user-email {
    color: #1e4f7a;
    font-weight: 600;
}

.page-dashboard .header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-dashboard .add-class {
    background: #3a8dc1;
    color: white;
    padding: 40px;
    border-radius: 20px;
    width: 260px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
}

.page-dashboard .stats {
    display: flex;
    gap: 30px;
}

.page-dashboard .stat-card {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-dashboard .stat-card h2 {
    font-size: 28px;
    margin-top: 10px;
}

.page-dashboard .table-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-dashboard .table-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-dashboard .search-input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.page-dashboard .score-good {
    background: #4CAF50;
}

.page-dashboard .score-bad {
    background: #f44336;
}

.page-dashboard .pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

.page-dashboard .page-btn {
    padding: 6px 10px;
    border-radius: 6px;
    background: #eee;
    cursor: pointer;
}

.page-dashboard .page-btn.active {
    background: #1e4f7a;
    color: white;
}

@media (max-width: 900px) {
    .page-dashboard {
        flex-direction: column;
    }

    .page-dashboard .sidebar {
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 15px 5%;
        box-sizing: border-box;
    }

    .page-dashboard .sidebar .logo {
        margin-bottom: 0;
    }

    .page-dashboard .sidebar .menu-item {
        margin-bottom: 0;
        padding: 8px 15px;
    }

    .page-dashboard .sidebar .profile {
        margin-top: 0;
    }

    .page-dashboard .main {
        padding: 20px 5%;
        width: 100%;
        box-sizing: border-box;
    }

    .page-dashboard .topbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .page-dashboard .header-section {
        flex-direction: column;
        gap: 20px;
    }

    .page-dashboard .add-class {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 20px;
    }

    .page-dashboard .stats {
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }

    .page-dashboard .stat-card {
        width: 100%;
        box-sizing: border-box;
    }

    .page-dashboard .class-table,
    .page-dashboard #studentTable,
    .page-dashboard table {
        min-width: 600px;
    }

    .page-dashboard .table-container,
    .page-dashboard .dashboard-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 600px) {
    .page-dashboard .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .page-dashboard .sidebar {
        flex-direction: column;
        gap: 15px;
    }
}

/* HOMEPAGE */
/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 10%;
    background-color: #f8fbff;
    gap: 30px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text span {
    color: #3498db;
}

.hero-text p {
    color: #666;
    margin-bottom: 30px;
    max-width: 500px;
}



.hero-image {
    flex: 1;
    text-align: right;
    position: relative;
}

.hero-image img {
    width: 70%;
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 5%;
    }

    .hero-text p {
        margin: 0 auto 30px;
    }

    .hero-image {
        text-align: center;
        width: 100%;
        margin-top: 20px;
    }

    .hero-image img {
        width: 90%;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .cta-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

/* Module Grid */
.section-title {
    text-align: center;
    margin: 20px 0 20px;
}

.section-title h2 {
    font-size: 42px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 5%;
    align-items: stretch;
    margin-top: 2%;
}

.module-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;

    /* 1. Make the card a flex container */
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Important for alignment */
}

.module-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.module-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.module-content h4 {
    color: #1a5f93;
    font-size: 14px;
    margin-bottom: 10px;
}

.module-content p {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}


.btn-lesson {
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-size: 12px;

    /* 3. THE MAGIC LINE: Pushes button to bottom */
    margin-top: auto;

    display: inline-block;
    transition: background 0.3s;
}

.btn-lesson:hover {
    background-color: #2980b9;
}

@media (max-width: 900px) {
    .section-title {
        margin: 40px 20px;
    }

}










/* Steps Section */
.steps-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 5%;
}

.step-card {
    text-align: left;
    padding: 20px;
    border-radius: 12px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
}

.step-img {
    width: 100%;
    height: 180px;
    background: #eef7ff;
    border-radius: 8px;
    margin-bottom: 20px;
}












/* MATERIAL LAYOUT STYLES */

/* Layout Wrapper */
.study-container {
    display: flex;
    background-color: #f0f7ff;
    /* Light blue background from image */
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: white;
    padding-top: 20px;
    border-right: 1px solid #e0e8f0;
}

.sidebar-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    border-left: 5px solid transparent;
    transition: 0.3s;
}

.sidebar-item i {
    margin-right: 15px;
    width: 20px;
}

.sidebar-item.active {
    background: #eef7ff;
    color: #1a5f93;
    border-left-color: #3498db;
    font-weight: bold;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 50px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .study-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e8f0;
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }

    .sidebar-item {
        padding: 10px 15px;
        margin-right: 10px;
    }

    .main-content {
        padding: 20px 5%;
    }
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.study-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid #e0e8f0;
}

.study-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #3498db;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Start Quiz Button (Gradient like image) */
.btn-start-quiz {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1a5f93, #3498db);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    margin-top: 40px;
}

.play-icon-white {
    background: white;
    color: #3498db;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}











/* QUIZ */
/* Quiz Layout */
.quiz-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    padding: 20px 5%;
    background-color: #f8fbff;
}

@media (max-width: 900px) {
    .quiz-container {
        grid-template-columns: 1fr;
    }

    .quiz-video-section {
        position: relative;
        top: 0;
    }
}

/* Video & Left Side */
.quiz-video-section {
    position: sticky;
    top: 20px;
}

.video-wrapper {
    /* background: #000; */
    border-radius: 12px;
    /* overflow: hidden; */
    margin-bottom: 20px;
}

/* Score Box (Top Right) */
.score-box {
    background: #1a5f93;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.score-stats {
    font-size: 14px;
    text-align: right;
}

/* Question & Options */
.question-item {
    margin-bottom: 40px;
}

.question-text {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.option-btn {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: 0.2s;
    overflow: hidden;
    width: 100%;
}

.option-letter {
    background: #bdc3c7;
    color: white;
    padding: 12px 18px;
    font-weight: bold;
}

.option-label {
    padding: 12px;
    flex: 1;
    text-align: left;
}

/* Feedback States */
.option-btn.correct {
    border-color: #2ecc71;
    background: #eafaf1;
}

.option-btn.correct .option-letter {
    background: #2ecc71;
}

.option-btn.wrong {
    border-color: #e74c3c;
    background: #fdedec;
}

.option-btn.wrong .option-letter {
    background: #e74c3c;
}

.disabled {
    pointer-events: none;
    opacity: 0.8;
}

/* Selected but not yet evaluated */
.option-btn.selected {
    border-color: #3498db;
    background: #ebf5fb;
}

.option-btn.selected .option-letter {
    background: #3498db;
}


/* THESE ARE FOR TYPE 2 QUIZ QUESTIONS (WITH IMAGES) */
/* Navigation Buttons */
.quiz-nav {
    display: flex;
    gap: 10px;
    padding: 10px 5%;
    border-bottom: 2px solid #eee;
    background: white;
}

/* Option States */
.option-btn.selected {
    border-color: #3498db;
    background-color: #f0f7ff;
}

.option-btn.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

/* Post-Submission feedback */
.option-btn.correct-reveal {
    border-color: #27ae60 !important;
    background-color: #eafaf1 !important;
}

.option-btn.correct-reveal .option-letter {
    background-color: #27ae60 !important;
}

.option-btn.wrong-reveal {
    border-color: #e74c3c !important;
    background-color: #fdedec !important;
}

.option-btn.wrong-reveal .option-letter {
    background-color: #e74c3c !important;
}

/* QUIZ PAGES (.page-quiz) */
.page-quiz .essay-input {
    width: 100%;
    height: 80px;
    padding: 15px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: 0.3s;
}

.page-quiz .question-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.page-quiz .essay-input.correct {
    background-color: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.page-quiz .essay-input.wrong {
    background-color: #e74c3c;
    color: white;
    border-color: #c0392b;
}

.page-quiz .essay-input.partial {
    background-color: #f1c40f;
    color: white;
    border-color: #f39c12;
}

.page-quiz .answer-reveal {
    margin-top: -20px;
    padding: 10px 15px;
    background-color: #eef7ff;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 13px;
    color: #1a5f93;
    display: none;
    margin-bottom: 20px;
}

.page-quiz .timer-box {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border: 2px solid #1e4f7a;
    border-radius: 8px;
    width: fit-content;
}

@media (max-width: 900px) {
    .page-quiz .timer-box {
        margin: 10px auto;
    }
}

/* YTRP Video Player Styles */
.ytrp_master_body {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    font-family: inherit;
}

#ytrp_container {
    width: 640px;
    max-width: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.ytrp_video_wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

#ytrp_iframe_mount {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ytrp_click_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
}

.ytrp_controls_bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #222;
    padding: 10px 15px;
    color: #fff;
}

.ytrp_ctrl_group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ytrp_btn {
    background-color: #444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    font-size: 14px;
}

.ytrp_btn:hover {
    background-color: #666;
}

.ytrp_btn:disabled {
    background-color: #333;
    color: #777;
    cursor: not-allowed;
}

.ytrp_time_text {
    font-family: monospace;
    font-size: 14px;
    color: #ddd;
}

#ytrp_status_msg {
    text-align: center;
    padding: 10px;
    background-color: #fff;
    color: #333;
    font-weight: bold;
    border-top: 1px solid #ddd;
}

/* QUIZ LAYOUT (.page-quiz) */
.page-quiz .container {
    width: 90%;
    margin: 30px auto;
}

.page-quiz .top-buttons {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 30px;
}


.page-quiz .top-buttons>a {
    text-decoration: none;
}

.page-quiz .top-buttons>a button {
    padding: 12px 20px;
    box-sizing: border-box;
    white-space: nowrap;
}

.page-quiz .timer-box {
    margin-left: auto;
    /* Pushes everything after this to the right */
    margin-right: 0;
}

.page-quiz .btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #1e4f7a;
    background: white;
    color: white;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: .3s;
}

.page-quiz #submitBtn {
    color: white;
}

.page-quiz #submitBtn:hover {
    background: #1e5fa6 !important;
}

.page-quiz .btn:hover {
    background: #163d6b;
    color: white;
}

.page-quiz .btn.primary {
    background: #1e4f7a;
    color: white;
}

.page-quiz .content {
    display: flex;
    gap: 40px;
}

.page-quiz .left {
    width: 40%;
}

.page-quiz .video-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.page-quiz .video-placeholder {
    width: 100%;
    height: 260px;
    background: #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.page-quiz .video-controls {
    margin-top: 10px;
}

.page-quiz .transcript {
    margin-top: 15px;
    padding: 12px;
    background: #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
}

.page-quiz .transcript-content {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.page-quiz .right {
    width: 60%;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.page-quiz .question {
    margin-bottom: 25px;
}

.page-quiz .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.page-quiz .option {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    background: #fafafa;
    transition: 0.2s;
}

.page-quiz .option:hover {
    background: #e6f0f7;
}

.page-quiz .option.correct {
    background: #c8f7c5;
}

.page-quiz .option.wrong {
    background: #f8c5c5;
}

.page-quiz .score-panel {
    position: absolute;
    right: 80px;
    top: 120px;
    background: #1e4f7a;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    width: 180px;
}

.page-quiz .score-panel div {
    margin: 5px 0;
    font-size: 14px;
}

.page-quiz .transcript.disabled {
    background: #ddd;
    color: #777;
    cursor: not-allowed;
}

.page-quiz .transcript.enabled {
    background: #1e4f7a;
    color: white;
    cursor: pointer;
}

.page-quiz .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.page-quiz .modal-box {
    width: 600px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    animation: popUp 0.4s ease;
}

.page-quiz .top-line {
    height: 6px;
    width: 90%;
    background: #2f6fa3;
    position: absolute;
    top: 15px;
    left: 5%;
    border-radius: 10px;
}

.page-quiz .modal-box h1 {
    font-size: 36px;
    margin: 10px 0 30px;
}

.page-quiz .trophy {
    font-size: 90px;
    margin-bottom: 30px;
}

.page-quiz .modal-box button {
    background: #1e5fa6;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}

.page-quiz .left-title h2 {
    margin-bottom: 20px;
    margin-top: 20px;
}

.page-quiz .video-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-quiz .video-wrapper {
    text-align: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

.page-quiz .video-wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.page-quiz .quiz-questions-section h1 {
    font-size: 24px;
    color: #1d4e89;
    margin-bottom: 20px;
}

.page-quiz .quiz-questions-section h2 {
    font-size: 16px;
    border-bottom: 2px solid #1d4e89;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* ABSOLUTE SCOREBOARD */
.page-quiz .fc-abs-scoreboard {
    grid-area: score;
    position: static;
    width: 20%;
    height: auto;
    background: #1e4f7a;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    color: #ffffff;
    margin-top: 15px;
}

.page-quiz .fc-abs-score-left {
    text-align: left;
}

.page-quiz .fc-abs-score-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.page-quiz .fc-abs-score-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.page-quiz .fc-abs-score-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.page-quiz .fc-abs-score-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    min-width: 100px;
}

@keyframes popUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .page-quiz .content {
        flex-direction: column;
    }

    .page-quiz .left,
    .page-quiz .right {
        width: 100%;
        box-sizing: border-box;
        /* Prevent padding from making it too wide */
    }

    .page-quiz .top-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px;
    }

    .page-quiz .top-buttons>a {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .page-quiz .top-buttons>a button {
        width: 100%;
        max-width: 300px;
        /* Kept to a reasonable size */
    }

    .page-quiz .timer-box {
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
        justify-content: center;
        box-sizing: border-box;
    }

    .page-quiz .fc-abs-scoreboard {
        position: static;
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
        flex-direction: column;
        align-items: center;
    }

    .page-quiz .fc-abs-score-left {
        text-align: center;
        margin-bottom: 10px;
    }

    .page-quiz .options {
        grid-template-columns: 1fr;
    }
}

/* MEDIA MODAL GENERIC */
.media-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 2000;
}

.media-modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.media-modal-box {
    background: white;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.media-modal-close {
    align-self: flex-end;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 10px;
    font-weight: bold;
}

.media-modal-content {
    overflow: auto;
    width: 100%;
}

.media-zoomable {
    cursor: pointer;
    transition: transform 0.2s;
}

.media-zoomable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* MODULE DETAIL (.page-module) */
.page-module .container {
    display: flex;
    padding: 30px 60px;
}

.page-module .sidebar {
    width: 250px;
    background: white;
    border-radius: 8px;
    padding: 10px 0;
    height: fit-content;
}

.page-module .sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-module .sidebar li {
    padding: 15px 20px;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.page-module .sidebar li.active {
    background: #e7f0fa;
    border-left: 4px solid #1d4e89;
    font-weight: 600;
}

.page-module .sidebar li:hover {
    background: #f1f5f9;
}

.page-module .content {
    flex: 1;
    margin-left: 30px;
}

.page-module .section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: none;
}

.page-module #capaian {
    display: block;
}

.page-module .section h3 {
    border-bottom: 2px solid #1d4e89;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.page-module .video-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-module .video-wrapper {
    text-align: center;
    width: 50%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

.page-module .video-wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.page-module .btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1d4e89;
    color: white;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    transition: .3s;
}

.page-module .btn:hover {
    background: #163d6b;
}

.page-module .download {
    float: right;
    font-size: 14px;
}

.page-module table {
    width: 100%;
    border-collapse: collapse;
}

.page-module table,
.page-module th,
.page-module td {
    border: 1px solid #ccc;
}

.page-module th,
.page-module td {
    padding: 10px;
    text-align: left;
}

.page-module .start-quiz {
    background: linear-gradient(to right, #1d4e89, #3aa6c9);
    color: white;
    padding: 40px;
    border-radius: 10px;
    font-size: 32px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20%;
    display: block;
    text-align: center;
}

.page-module .start-quiz:hover {
    opacity: 0.9;
}

.page-module #transcript {
    display: none;
    margin-top: 15px;
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
}

.page-module .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 1000;
}

.page-module .modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.page-module .modal-box {
    background: white;
    width: 600px;
    max-width: 90%;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transform: scale(.9);
    transition: transform .25s ease;
}

.page-module .modal-box::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #1f4f82;
    border-radius: 4px;
}

.page-module .modal-overlay.active .modal-box {
    transform: scale(1);
}

.page-module .modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.page-module .modal-content ul {
    padding-left: 20px;
    color: #555;
}

.page-module .modal-content li {
    margin-bottom: 8px;
    word-break: break-all;
}

.page-module .close-btn {
    margin-top: 30px;
    float: right;
    padding: 12px 35px;
    background: #1f4f82;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
}

.page-module .close-btn:hover {
    background: #173d64;
}

.page-module .sidebar-menu li {
    cursor: pointer;
    transition: 0.3s;
}

.page-module .sidebar-menu li.active {
    background-color: #eef7ff;
    color: #1a5f93;
    font-weight: bold;
    border-left: 4px solid #3498db;
}


.module-row-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}



.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border: 1px solid #eee;
}

.time-card {
    border-right: 1px solid #eee;
}

.time-card:last-child {
    border-right: none;
}

.time-header {
    background: #1a4a7a;
    color: white;
    padding: 12px;
    font-weight: 600;
}

.time-content {
    padding: 15px;
    font-size: 0.9em;
    line-height: 1.8;
}

.time-content.alt {
    background: #fafafa;
}

.time-content.alt-green {
    background: #f9fff9;
}



.module-grid-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.module-grid-list-warning {
    background-color: #fff4f4;
    border: 2px solid #d32f2f;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.module-grid-list-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.module-formation-custom {
    padding: 20px 40px;
}



@media (max-width: 900px) {
    .page-module .container {
        flex-direction: column;
        padding: 15px 5%;
    }

    .page-module .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .page-module .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 5px;
    }

    .page-module .sidebar li {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px;
        font-size: 14px;
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .page-module .sidebar li.active {
        border-left: none;
        border-bottom: 4px solid #1d4e89;
    }

    .page-module .content {
        margin-left: 0;
        margin-top: 10px;
    }

    .page-module .video-wrapper {
        width: 100%;
    }

    .page-module .start-quiz {
        padding: 20px;
        font-size: 24px;
        text-align: center;
    }

    .page-module .download {
        float: none;
        display: block;
        margin-top: 10px;
    }

    .module-row-list {
        display: grid;
        grid-template-columns: 1fr;
        margin: 25px 0;
        gap: 0;
    }

    .time-grid {
        grid-template-columns: 1fr;
    }

    .time-card {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .module-grid-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .module-grid-list-warning {
        gap: 15px;
        flex-direction: column;
    }


    .module-grid-list-boxes {
        grid-template-columns: 1fr;
    }

    .module-table-style {
        font-size: 12px;
    }

    .module-formation-custom {
        padding: 3% 5%;
    }

    .module-table-small {
        font-size: 9px;
    }
}

/* ================= COMPACT BURGER NAVBAR ================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 5%;
    background: white;
    width: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.nav-menu.active {
    display: flex;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: 0.3s;
    font-size: 16px;
}

.nav-links a:hover {
    color: #1e4f7a;
}

.nav-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-actions a {
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

.user-display {
    text-align: center;
    color: #1a5f93;
    font-weight: bold;
    font-size: 14px;
    word-break: break-all;
    background: #f0f7ff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.login {
    color: #1e4f7a;
    background: #f0f7ff;
}

.register {
    background: #1e4f7a;
    color: white;
}

.logout {
    background: #e74c3c;
    color: white;
}

.burger-btn {
    display: block;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 5px;
}

.burger-icon {
    width: 30px;
    height: 3px;
    background-color: #1e4f7a;
    display: block;
    margin: 6px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.burger-btn.open .burger-icon:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger-btn.open .burger-icon:nth-child(2) {
    opacity: 0;
}

.burger-btn.open .burger-icon:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* SHARED HOME/MODULES */
.cta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    gap: 30px;
}

.cta img {
    width: 300px;
    max-width: 100%;
    border-radius: 20px;
}

.cta-text {
    width: 50%;
    padding-left: 2%;
}

.cta-text h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-text button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    background: #1e4f7a;
    color: white;
    border-radius: 25px;
}

.module-content h4 {
    margin-top: 0px;
}

.module-selection {
    background-color: white;
    padding: 4% 0;
}

.steps-wrapper {
    margin-top: 10%;
}

@media (max-width: 768px) {
    .cta {
        flex-direction: column;
        padding: 40px 5%;
        text-align: center;
    }

    .cta-text {
        width: 100%;
        padding-left: 0;
    }
}

/* ABOUT PAGE (.page-about) */
.page-about .hero {
    background: linear-gradient(135deg, #2f80ed, #1e5fa6);
    color: #fff;
    padding: 80px 8%;
    position: relative;
    overflow: hidden;
    display: block;
}

.page-about .hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.page-about .hero p {
    max-width: 700px;
    line-height: 1.6;
}

.page-about .content {
    padding: 60px 8%;
}

.page-about .content h2 {
    margin-bottom: 20px;
    font-size: 26px;
}

.page-about .content ul {
    margin-left: 20px;
    line-height: 1.8;
}

.page-about .content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.page-about .creator-section {
    text-align: center;
    padding: 60px 8%;
}

.page-about .creator-section h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.page-about .creator-section p {
    margin-bottom: 40px;
    color: #555;
}

.page-about .creator-card {
    background: #fff;
    width: 300px;
    margin: auto;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: 0.3s;
}

.page-about .creator-card:hover {
    transform: translateY(-10px);
}

.page-about .creator-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #eef7ff;
}

.page-about .creator-name {
    font-size: 22px;
    color: #1e5fa6;
    margin-bottom: 5px;
}

.page-about .creator-role {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.page-about .creator-desc {
    font-size: 14px;
    line-height: 1.6;
}

.page-about .cta-section {
    background: #1e5fa6;
    color: white;
    text-align: center;
    padding: 60px 8%;
    margin-top: 40px;
}

.page-about .cta-section h2 {
    margin-bottom: 20px;
}

.page-about .btn-register-large {
    background: white;
    color: #1e5fa6;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    transition: 0.3s;
}

.page-about .btn-register-large:hover {
    background: #eef7ff;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .page-about .hero h1 {
        font-size: 36px;
    }
}