﻿/* -----------------------------------
    General Styles
----------------------------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom right, #d4fcd4, #c0f0c0);
    min-height: 100vh;
}

/* -----------------------------------
    Home Section
----------------------------------- */
#home {
    padding: 60px 20px;
}

.course-content {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* -----------------------------------
    Button Panel and Start Button
----------------------------------- */
.button-panel {
    margin-top: 40px;
}

.icon-btn {
    font-size: 2rem;
    color: #fff;
    background-color: #007bff;
    border-radius: 50%;
    padding: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

    .icon-btn:hover {
        background-color: #0056b3;
    }

/* -----------------------------------
    Course Menu
----------------------------------- */
#course-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 73vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
}

    #course-menu > li > strong {
        font-size: 1.2rem;
        color: #007bff;
    }

    #course-menu a {
        display: block;
        width: 100%;
        padding: 12px 18px;
        background: #ffffff;
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        font-size: 16px;
        font-weight: 500;
        text-align: left;
        transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

        #course-menu a:hover {
            background: #e6f0ff;
            color: #007bff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

    #course-menu ul li {
        margin-bottom: 10px;
    }

    #course-menu ul {
        list-style-type: none; /* Remove default bullets */
        padding-left: 1rem; /* Keep indentation clean */
    }
/* -----------------------------------
    Page Container
----------------------------------- */
#page-container {
    display: none;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

    #page-container nav {
        float: left;
        width: 25%;
        padding: 20px;
        background: #ffffff;
        min-height: 80vh;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    #page-container main {
        float: left;
        width: 75%;
        min-height: 80vh;
        padding: 20px;
        height: 90vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
    }

    /* Clear floats */
    #page-container::after {
        content: "";
        display: table;
        clear: both;
    }

/* -----------------------------------
    Video and Transcript Section
----------------------------------- */
.video-transcript-wrapper {
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    flex-direction: row;
}

.video-box {
    flex: 4;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0;
    height: auto;
    display: block;
}

    .video-box video {
        width: 100%;
        height: auto;
        object-fit: contain;
        background-color: #ffffff;
        border-radius: 10px;
        display: block;
    }

.transcript-box {
    flex: 2;
    background: #ffffff;
    padding: 0;
    border-radius: 10px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.video-box, .transcript-box {
    width: 100%;
}

/* -----------------------------------
    Video Title
----------------------------------- */
.video-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 25px;
    color: #212529;
}

/* -----------------------------------
    Video Speed Controls
----------------------------------- */
.video-controls {
    text-align: center;
    margin-bottom: 10px;
}

.speed-select {
    padding: 5px 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    margin-left: 5px;
}

    .speed-select:hover {
        background-color: #e6f0ff;
    }

/* -----------------------------------
    Transcript Styling
----------------------------------- */
.transcript-header {
    font-size: 1.4rem;
    font-weight: bold;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #007bff;
    border-bottom: 1px solid #ccc;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.transcript-icon {
    font-size: 1.6rem;
}

.transcript-line {
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

    .transcript-line.active {
        background: #e0f7fa;
        padding: 5px;
        border-radius: 5px;
    }

/* -----------------------------------
    Quiz Section
----------------------------------- */
.quiz-block {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

    .quiz-block h4 {
        margin-bottom: 20px;
        font-size: 1.2rem;
        color: #007bff;
    }

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 10px 15px;
    font-size: 1rem;
    background: #e6f0ff;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

    .quiz-option:hover {
        background-color: #d0e7ff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    }

    .quiz-option.correct {
        background-color: #c8e6c9; /* green */
        border-color: #4caf50;
        color: #2e7d32;
    }

    .quiz-option.incorrect {
        background-color: #ffcdd2; /* red */
        border-color: #f44336;
        color: #b71c1c;
    }

.explanation {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #555;
}

/* Show Score Button */
#show-score-button {
    display: block;
    margin: 30px auto;
    padding: 12px 25px;
    font-size: 1.1rem;
    color: #ffffff;
    background-color: #28a745;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

    #show-score-button:hover {
        background-color: #218838;
    }

    #show-score-button:disabled {
        background-color: #cccccc;
        cursor: not-allowed;
    }

/* Score Display */
#score-display {
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    color: #007bff;
}

.score-display.hidden {
    display: none;
}

/* Toggle Menu Button Styling */
#toggle-menu {
    display: none; /* Hidden by default */
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    text-align: center;
}

    #toggle-menu:hover {
        background-color: #0056b3;
    }

/* -----------------------------------
    Menu Styles
----------------------------------- */
.topic-link {
    display: block;
    position: relative;
    background-color: #007bff;
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

    .topic-link:hover {
        background-color: #0056b3;
    }

    /* Embed progress bar inside the button */
    .topic-link .inner-progress {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 4px;
        background-color: #7fd47f; /* green */
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        transition: width 0.4s ease;
    }


/* -----------------------------------
    Analytics Styles
----------------------------------- */
.stat-card:hover {
    transform: translateY(-2px);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    cursor: default;
}

/* -----------------------------------
    Responsive Styles
----------------------------------- */
@media (max-width: 992px) {
    #page-container nav,
    #page-container main {
        float: none;
        width: 100%;
        min-height: auto;
    }

    .video-transcript-wrapper {
        flex-direction: column;
    }

    .video-box, .transcript-box {
        width: 100%;
    }
}

/* -----------------------------------
    Top Bar
----------------------------------- */
.top-bar {
    height: 60px;
    border-bottom: 1px solid #ddd;
    background-color: #ffffff;
}

    .top-bar img {
        max-height: 40px;
        margin-right: 15px;
    }

/* -----------------------------------
    Progress Bar
----------------------------------- */

.progress {
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 10px;
}

.progress-bar {
    background-color: #28a745;
    height: 100%;
    transition: width 0.4s ease;
}

/* -----------------------------------
    Graph Styles
----------------------------------- */
.fade-in {
    animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------
    Footer Styles
----------------------------------- */
/* 🎨 Footer link styling */
.footer-link {
    color: #6c757d; /* Bootstrap's muted color */
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

    .footer-link:hover {
        text-decoration: underline;
        color: #0d6efd; /* Bootstrap primary color on hover */
    }
/* -----------------------------------
    Count Down Styles
----------------------------------- */
/* Styles for the top banner message */
.top-banner-message {
    background-color: #ffe6e6; /* A softer red/pink background for urgency */
    color: #cc0000; /* Dark red text for high contrast */
    padding: 15px 20px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    display: flex; /* Use flexbox for easy alignment */
    justify-content: center;
    align-items: center;
    gap: 15px; /* Space between message and countdown */
    border-bottom: 2px solid #ff9999; /* A subtle border */
    border-radius: 8px; /* Rounded corners for the banner */
    margin: 20px auto; /* Center the banner and give it some margin */
    max-width: 90%; /* Max width to keep it responsive */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

/* Styles for the countdown numbers and units */
#countdown-container {
    display: flex;
    gap: 5px; /* Small gap between each number-unit pair */
    align-items: baseline; /* Align units nicely */
}

.countdown-value {
    font-size: 1.8em; /* Make the numbers significantly larger */
    min-width: 45px; /* Ensure numbers like '1' don't collapse width */
    text-align: right; /* Align numbers right for consistent look */
    display: inline-block; /* Allow padding/margin control */
    color: #a00000; /* Slightly darker red for numbers */
}

.countdown-unit {
    font-size: 0.8em; /* Smaller font for 'd', 'h', 'm', 's' */
    vertical-align: super; /* Position units slightly above the numbers */
    margin-right: 10px; /* Space after each unit (e.g., after 'd') */
    color: #660000; /* Muted color for units */
}
/* -----------------------------------
    Mobile Collapsible Sidebar
----------------------------------- */
@media (max-width: 768px) {
    #toggle-menu {
        display: block;
    }

        #toggle-menu:hover {
            background-color: #3b66d1;
        }

    #course-sidebar {
        width: 100%;
        padding: 10px;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    #page-container {
        flex-direction: column;
        align-items: stretch;
    }

        #page-container nav {
            float: none;
            width: 100%;
            min-height: auto;
            box-shadow: none;
        }

        #page-container main {
            float: none;
            width: 100%;
            min-height: auto;
        }

    .transcript-box {
        max-height: 250px;
        overflow-y: auto;
    }

    .action-button .button-text {
        display: none;
    }

    .action-button {
        padding: 10px;
        font-size: 1.2rem;
    }
    .top-banner-message {
        font-size: 1em;
        flex-direction: column; /* Stack elements on smaller screens */
        gap: 5px;
        padding: 10px;
    }

    #countdown-container {
        flex-wrap: wrap; /* Allow countdown parts to wrap */
        justify-content: center;
    }

    .countdown-value {
        font-size: 1.5em;
        min-width: 35px;
    }

    .countdown-unit {
        margin-right: 5px;
    }
}

