/* ==========================================================
   GLOBAL
========================================================== */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f5f7;
    color: #2b2f33;
}


/* ==========================================================
   LOGIN PAGE
========================================================== */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at top,
            #ffffff 0%,
            #f3f5f7 50%,
            #e9edf1 100%
        );
}

.login-box {
    width: 100%;
    max-width: 420px;

    padding: 45px 40px;

    background: #ffffff;

    border: 1px solid #dde1e5;
    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(40, 50, 60, 0.10);
}

.login-box h1 {
    margin: 0 0 10px;

    font-size: 30px;
    font-weight: 600;

    text-align: center;

    color: #252a30;
}

.login-description {
    margin: 0 0 30px;

    color: #747b83;

    text-align: center;

    font-size: 14px;
}

/* ==========================================================
   LOGIN LOGO
========================================================== */

.login-logo {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 22px;

    text-align: center;
}

.login-logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 280px;
    max-height: 100px;

    margin: 0 auto;

    object-fit: contain;
}


/* ==========================================================
   LOGIN FORM
========================================================== */

.login-box label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    color: #555d65;
}

.login-box input {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid #d5d9de;
    border-radius: 9px;

    background: #f8f9fa;
    color: #252a30;

    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

.login-box input:focus {
    background: #ffffff;

    border-color: #6b8eae;

    box-shadow:
        0 0 0 3px rgba(107, 142, 174, 0.12);
}

.password-label {
    margin-top: 18px;
}

.login-box button {
    width: 100%;

    margin-top: 15px;

    padding: 14px;

    border: 0;
    border-radius: 9px;

    background: #4f718f;
    color: #ffffff;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s;
}

.login-box button:hover {
    background: #405f79;

    transform: translateY(-1px);
}


/* ==========================================================
   LOGIN ERROR
========================================================== */

.error {
    margin-bottom: 20px;

    padding: 12px 14px;

    background: #fff0f0;

    border: 1px solid #f1caca;
    border-radius: 8px;

    color: #b14b4b;

    font-size: 14px;
}


/* ==========================================================
   FLOATING / STICKY HEADER
========================================================== */

.header {
    position: sticky;
    top: 15px;

    z-index: 1000;

    width: 94%;
    max-width: 1500px;

    margin: 15px auto 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 14px 22px;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(210, 215, 220, 0.9);
    border-radius: 14px;

    box-shadow:
        0 8px 30px rgba(40, 50, 60, 0.12);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================
   HEADER LEFT SIDE
========================================================== */

.header-left {
    display: flex;

    align-items: center;

    gap: 22px;

    min-width: 0;
}


/* ==========================================================
   HEADER TITLE
========================================================== */

.header-title {
    color: #292e34;

    font-size: 30px;
    font-weight: 600;

    line-height: 1.2;

    letter-spacing: -0.3px;

    white-space: nowrap;
}


/* ==========================================================
   HEADER LOGO
========================================================== */

.header-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.header-logo a {
    display: block;

    text-decoration: none;
}

.logo-image {
    display: block;

    width: auto;
    height: 52px;

    max-width: 280px;

    object-fit: contain;
}


/* ==========================================================
   HEADER ACTIONS
========================================================== */

.header-actions {
    display: flex;
    align-items: center;

    gap: 15px;
}


/* ==========================================================
   LECTURE DROPDOWN
========================================================== */

.lecture-dropdown {
    display: flex;
    align-items: center;

    gap: 8px;
}

.lecture-dropdown label {
    font-size: 13px;
    font-weight: 500;

    color: #737a82;

    white-space: nowrap;
}

.lecture-dropdown select {
    min-width: 180px;

    padding:
        10px 35px
        10px 12px;

    background: #f7f8f9;
    color: #3c4248;

    border: 1px solid #d4d9de;
    border-radius: 8px;

    font-family: inherit;
    font-size: 14px;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}

.lecture-dropdown select:hover {
    background: #ffffff;

    border-color: #bfc6cc;
}

.lecture-dropdown select:focus {
    background: #ffffff;

    border-color: #6b8eae;

    box-shadow:
        0 0 0 3px rgba(107, 142, 174, 0.12);
}


/* ==========================================================
   LOGOUT BUTTON
========================================================== */

.logout {
    padding: 10px 18px;

    border: 1px solid #d4d9de;
    border-radius: 8px;

    background: #f7f8f9;

    color: #59616a;

    text-decoration: none;

    font-size: 14px;

    white-space: nowrap;

    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s;
}

.logout:hover {
    background: #eceff2;

    border-color: #c5cbd1;

    color: #252a30;
}


/* ==========================================================
   MAIN CONTAINER
========================================================== */

.container {
    width: 90%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 50px 0 80px;
}


/* ==========================================================
   LECTURE SECTION
========================================================== */

.lecture-section {
    margin-bottom: 70px;

    /*
     * Prevent floating header from covering section title
     * when jumping to an anchor.
     */
    scroll-margin-top: 120px;
}

.lecture-section:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   LECTURE SECTION HEADING
========================================================== */

.section-heading {
    margin-bottom: 25px;

    padding-bottom: 14px;

    border-bottom: 1px solid #dfe3e7;
}

.section-anchor {
    display: inline-block;

    color: #292e34;

    text-decoration: none;

    transition: color 0.2s;
}

.section-anchor h2 {
    margin: 0;

    font-size: 28px;
    font-weight: 600;

    line-height: 1.3;
}

.section-anchor:hover {
    color: #5d7f9d;
}


/* Anchor # symbol */

.section-anchor h2::after {
    content: "#";

    margin-left: 10px;

    color: #aab0b6;

    font-size: 18px;

    opacity: 0;

    transition: opacity 0.2s;
}

.section-anchor:hover h2::after {
    opacity: 1;
}


/* ==========================================================
   VIDEO GRID
========================================================== */

.video-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 35px;
}


/* ==========================================================
   VIDEO CARD
========================================================== */

.video-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e0e4e8;
    border-radius: 14px;

    box-shadow:
        0 8px 30px rgba(50, 60, 70, 0.07);

    transition:
        transform 0.2s,
        border-color 0.2s,
        box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);

    border-color: #d2d7dc;

    box-shadow:
        0 12px 35px rgba(50, 60, 70, 0.11);
}


/* ==========================================================
   RESPONSIVE VIDEO
========================================================== */

.video-wrapper {
    position: relative;

    width: 100%;

    padding-top: 56.25%;

    background: #e5e7e9;
}

.video-wrapper iframe {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    border: 0;
}


/* ==========================================================
   VIDEO INFORMATION
========================================================== */

.video-info {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 22px;
}

.video-info h2,
.video-info h3 {
    margin: 0 0 10px;

    color: #292e34;

    font-size: 19px;
    font-weight: 600;

    line-height: 1.4;
}

.video-info p {
    margin: 0 0 22px;

    color: #737a82;

    font-size: 14px;
    line-height: 1.6;
}


/* ==========================================================
   STUDY GUIDE BUTTON
========================================================== */

/* ==========================================================
   SECTION TITLE + STUDY GUIDE
========================================================== */

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* ==========================================================
   SECTION STUDY GUIDE BUTTON
========================================================== */

.section-study-guide {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 16px;

    background: #5d7f9d;
    color: #ffffff;

    border: 1px solid #5d7f9d;
    border-radius: 8px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}


.section-study-guide:hover {
    background: #486b89;

    border-color: #486b89;

    transform: translateY(-1px);

    box-shadow:
        0 5px 15px rgba(72, 107, 137, 0.18);
}


.section-study-guide .download-icon {
    font-size: 17px;

    line-height: 1;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    .section-title-row {
        flex-direction: column;

        align-items: flex-start;

        gap: 12px;
    }


    .section-study-guide {
        width: 100%;

        padding: 11px 16px;
    }

}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {

    .header {
        width: 94%;

        top: 10px;

        margin-top: 10px;

        padding: 12px 16px;
    }
	
	.header-left {
		gap: 15px;
	}

	.header-title {
		font-size: 24px;
	}


    .logo-image {
        height: 48px;

        max-width: 240px;
    }


    .header-actions {
        gap: 10px;
    }


    .lecture-dropdown label {
        display: none;
    }


    .lecture-dropdown select {
        min-width: 150px;
    }


    .container {
        width: 92%;

        padding-top: 35px;
    }


    .video-grid {
        gap: 25px;
    }


    .lecture-section {
        scroll-margin-top: 100px;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .header {
        gap: 12px;

        padding: 11px 14px;
    }
	
	.header-title {
		font-size: 20px;
	}


    .logo-image {
        height: 44px;

        max-width: 200px;
    }


    .header-actions {
        gap: 7px;
    }


    .lecture-dropdown select {
        min-width: 130px;

        padding:
            9px 28px
            9px 10px;

        font-size: 13px;
    }


    .logout {
        padding:
            9px 12px;

        font-size: 13px;
    }


    .container {
        width: 92%;

        padding:
            35px 0
            60px;
    }


    .lecture-section {
        margin-bottom: 55px;

        scroll-margin-top: 95px;
    }


    .section-heading {
        margin-bottom: 20px;
    }


    .section-anchor h2 {
        font-size: 23px;
    }


    .video-grid {
        grid-template-columns: 1fr;

        gap: 25px;
    }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 500px) {

    /* LOGIN */

    .login-page {
        padding: 20px;
    }


    .login-box {
        padding: 35px 25px;
    }
	
	.login-logo img {
        max-width: 220px;
        max-height: 80px;
    }


    .login-box h1 {
        font-size: 26px;
    }


    /* FLOATING HEADER */

    .header {
        width: calc(100% - 24px);

        top: 8px;

        margin:
            8px auto
            0;

        flex-wrap: wrap;

        gap: 10px;

        padding: 12px 14px;

        border-radius: 12px;
    }


    /* LOGO */

    .header-left {
		width: 100%;

		justify-content: center;

		gap: 12px;
	}

	.header-logo {
		width: auto;
	}
	
	.header-title {
		font-size: 20px;

		white-space: normal;
	}


    .logo-image {
        height: 42px;

        max-width: 210px;
    }


    /* HEADER ACTIONS */

    .header-actions {
        width: 100%;

        justify-content: space-between;

        gap: 8px;
    }


    /* DROPDOWN */

    .lecture-dropdown {
        flex: 1;
    }


    .lecture-dropdown select {
        width: 100%;

        min-width: 0;
    }


    /* LOGOUT */

    .logout {
        flex-shrink: 0;
    }


    /* MAIN */

    .container {
        padding-top: 30px;
    }


    /* LECTURE */

    .lecture-section {
        scroll-margin-top: 155px;
    }


    .section-anchor h2 {
        font-size: 22px;
    }


    .section-anchor h2::after {
        display: none;
    }


    /* VIDEO */

    .video-info {
        padding: 18px;
    }


    .video-info h2,
    .video-info h3 {
        font-size: 17px;
    }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 360px) {

    .header {
        width: calc(100% - 16px);

        margin-top: 8px;

        padding: 10px;
    }


    .logo-image {
        height: 38px;

        max-width: 180px;
    }


    .lecture-dropdown select {
        font-size: 12px;
    }


    .logout {
        padding:
            9px 10px;

        font-size: 12px;
    }

}