:root {
    --primary-color: #1b3c25;
    /* Dark Green */
    --accent-color: #4CAF50;
    /* Light Green */
    --bg-color: #ffffff;
    --text-color: #333;
    --card-bg: #fdfdfd;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f5;
    color: var(--text-color);
}

/* --- LOGIN SCREEN --- */
#login-screen {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1b3c25, #0f2416);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

/* LOGO FIXES: perfectly even size */
.logo-bynt,
.logo-dv {
    height: 70px;
    width: 70px;
    /* Explicit square */
    object-fit: contain;
    border-radius: 12px;
    background-color: #f8f5e9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 4px;
    /* Uniform padding */
}

/* Make headers slightly smaller */
header .logo-bynt,
header .logo-dv {
    height: 50px;
    width: 50px;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #1b3c25, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #132b1a;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- DASHBOARD --- */
#dashboard {
    display: none;
    /* Hidden by default */
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content h2 {
    color: var(--primary-color);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

/* Logout Button Style */
#logout-btn {
    background: #ffebeb;
    color: #d32f2f;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

#logout-btn:hover {
    background: #ffcdd2;
}

/* HERO SECTION */
.hero-section {
    background-image: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-quote {
    font-size: 1.4rem;
    font-style: italic;
    max-width: 700px;
    margin-bottom: 10px;
}

.hero-sub {
    font-size: 1rem;
    opacity: 0.9;
}

/* CONTENT CONTAINER */
.content-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.folder-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.folder-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.folder-title {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.folder-desc {
    color: #777;
    font-size: 0.9rem;
}

/* --- GAMIFICATION PROGRESS BAR --- */
.progress-container {
    background: #e0e0e0;
    border-radius: 8px;
    height: 10px;
    /* Slimmer bar */
    width: 100%;
    margin-top: 15px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-color), #2d5a36);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    text-align: right;
    font-weight: 500;
}


/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    /* Prevent it from being taller than screen */
    overflow-y: auto;
    /* Enable scrolling inside if needed */
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 2.5rem;
    /* Larger for easier tapping */
    color: white;
    cursor: pointer;
    z-index: 1001;
    /* Ensure above modal content */
    padding: 10px;
    /* larger touch target */
    line-height: 20px;
}

.video-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-list {
    padding: 20px;
    background: #fdfdfd;
}

.video-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 8px;
}

.video-item:hover {
    background-color: #f0f0f0;
}

.video-item.active {
    background-color: #e8f5e9;
    font-weight: 600;
    color: var(--primary-color);
}

.video-item:last-child {
    border-bottom: none;
}

@media (max-width: 600px) {
    .header-content h2 {
        font-size: 1.2rem;
    }

    .hero-quote {
        font-size: 1.1rem;
    }
}

/* --- Completion Button --- */
#mark-complete-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed !important;
}

.btn-success {
    background-color: var(--primary-color);
    /* Green */
    color: white;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(27, 60, 37, 0.3);
}

.btn-success:hover {
    background-color: #132b1a;
    transform: translateY(-2px);
}

/* --- Quiz Styles --- */
.quiz-question-block {
    /* No margin bottom needed as we show one at a time */
    padding-bottom: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.quiz-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.quiz-option {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: white;
    transition: all 0.2s;
    font-weight: 500;
    color: #555;
    display: flex;
    /* Flex to align radio and text */
    align-items: center;
    gap: 10px;
}

.quiz-option:hover {
    background-color: #f1f8f4;
    /* Light green tint */
    border-color: #1b3c25;
}

.quiz-option input {
    margin: 0;
    /* Handled by gap */
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

/* Selected state styling */
.quiz-option:has(input:checked) {
    background-color: #e8f5e9;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quiz-progress-indicator {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.quiz-feedback {
    font-size: 0.95rem;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: left;
    display: none;
}

.feedback-correct {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.feedback-wrong {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}