@font-face {
    font-family: "Quicksand";
    src: url("./fonts/Quicksand-Regular.woff") format("woff");
    src: url("./fonts/Quicksand-Regular.woff2") format("woff2");
}

:root,
:root.dark-theme {
    --card: #0b1220;
    --muted: #98a0b3;

    --accent: #a78bfa;
    --accent-2: #7c5cff;
    --bg-color-1: #050213;
    --bg-color-2: #1f1a37;

    --text-primary: #e6eef8;
    --text-white: #ffffff;

    --success-green: #7bff7b;
    --error-red: #ff7b7b;

    --border-light: #ffffff08;
    --border-light-2: #ffffff0f;
    --border-light-3: #ffffff1a;

    --bg-light: #ffffff05;
    --bg-light-2: #ffffff0f;

    --shadow-dark: #7c5cff26;
    --shadow-dark-2: #7c5cff2e;
    --shadow-accent: #7c5cff1f;

    --gradient-button: linear-gradient(90deg, #7a5af8, #9d79ff);
    --gradient-accent: linear-gradient(90deg, var(--accent), var(--accent-2));
    --gradient-secondary: linear-gradient(90deg, #556bff, #7c93ff);
    --gradient-bg: linear-gradient(180deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
}

:root.light-theme {
    --card: #f5f5f5;
    --muted: #666666;

    --accent: #8E1637;
    --accent-2: #6b0d2b;
    --bg-color-1: #ffffff;
    --bg-color-2: #a83838;

    --text-primary: #111111;
    --text-white: #ffffff;

    --success-green: #00cf00;
    --error-red: #ff3c3c;

    --border-light: #00000014;
    --border-light-2: #0000001f;
    --border-light-3: #00000029;

    --bg-light: #00000005;
    --bg-light-2: #0000000f;

    --shadow-dark: #6b0d2bd9;
    --shadow-dark-2: #6b0d2bd1;
    --shadow-accent: #6b0d2b1f;

    --gradient-button: linear-gradient(90deg, #8E1637, #6b0d2b);
    --gradient-accent: linear-gradient(90deg, var(--accent), var(--accent-2));
    --gradient-secondary: linear-gradient(90deg, #a84065, #8E1637);
    --gradient-bg: linear-gradient(180deg, var(--bg-color-1) 10%, var(--bg-color-2) 300%);
}

@media screen and (prefers-color-scheme: dark) {
    :root:not(.light-theme) {
        --card: #0b1220;
        --muted: #98a0b3;

        --accent: #a78bfa;
        --accent-2: #7c5cff;
        --bg-color-1: #050213;
        --bg-color-2: #1f1a37;

        --text-primary: #e6eef8;
        --text-white: #ffffff;

        --success-green: #7bff7b;
        --error-red: #ff7b7b;

        --border-light: #ffffff08;
        --border-light-2: #ffffff0f;
        --border-light-3: #ffffff1a;

        --bg-light: #ffffff05;
        --bg-light-2: #ffffff0f;

        --shadow-dark: #7c5cff26;
        --shadow-dark-2: #7c5cff2e;
        --shadow-accent: #7c5cff1f;

        --gradient-button: linear-gradient(90deg, #7a5af8, #9d79ff);
        --gradient-accent: linear-gradient(90deg, var(--accent), var(--accent-2));
        --gradient-secondary: linear-gradient(90deg, #556bff, #7c93ff);
        --gradient-bg: linear-gradient(180deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
    }
}

@media screen and (prefers-color-scheme: light) {
    :root:not(.dark-theme) {
        --card: #f5f5f5;
        --muted: #666666;

        --accent: #8E1637;
        --accent-2: #6b0d2b;
        --bg-color-1: #ffffff;
        --bg-color-2: #a83838;

        --text-primary: #111111;
        --text-white: #ffffff;

        --success-green: #00cf00;
        --error-red: #ff3c3c;

        --border-light: #00000014;
        --border-light-2: #0000001f;
        --border-light-3: #00000029;

        --bg-light: #00000005;
        --bg-light-2: #0000000f;

        --shadow-dark: #6b0d2bd9;
        --shadow-dark-2: #6b0d2bd1;
        --shadow-accent: #6b0d2b1f;

        --gradient-button: linear-gradient(90deg, #8E1637, #6b0d2b);
        --gradient-accent: linear-gradient(90deg, var(--accent), var(--accent-2));
        --gradient-secondary: linear-gradient(90deg, #a84065, #8E1637);
        --gradient-bg: linear-gradient(180deg, var(--bg-color-1) 10%, var(--bg-color-2) 300%);
    }
}


/* ALTERNATE DARK THEME - NEON CYAN/TEAL (UNUSED)
A vibrant, modern dark theme with cyan and teal accents
To use, apply the .alt-dark-theme class to :root */

:root.alt-dark-theme {
    --bg: #0a1a15;
    --card: #0d2420;
    --muted: #7cbd9e;

    --accent: #00d4aa;
    --accent-2: #00a88d;
    --bg-color-1: #071a15;
    --bg-color-2: #0d2420;

    --text-primary: #e6f8f5;
    --text-white: #ffffff;

    --success-green: #00ff88;
    --error-red: #ff5566;

    --border-light: #00d4aa08;
    --border-light-2: #00d4aa0f;
    --border-light-3: #00d4aa1a;

    --bg-light: #00d4aa05;
    --bg-light-2: #00d4aa0f;

    --shadow-dark: #00211c99;
    --shadow-dark-2: #00000066;
    --shadow-accent: #00d4aa1f;

    --gradient-button: linear-gradient(90deg, #00c994, #00f5d4);
    --gradient-accent: linear-gradient(90deg, var(--accent), var(--accent-2));
    --gradient-secondary: linear-gradient(90deg, #0099cc, #00d4ff);
    --gradient-bg: linear-gradient(180deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
}

/* Color Palette Reference:
- Primary Dark: #0a1a15 (Teal-black)
- Card Background: #0d2420 (Dark teal)
- Primary Accent: #00d4aa (Bright cyan)
- Secondary Accent: #00a88d (Muted teal)
- Text: #e6f8f5 (Light cyan-white)
- Success: #00ff88 (Neon green)
- Error: #ff5566 (Coral red)
- Button Gradient: Cyan-green (#00c994 → #00f5d4)
- Secondary Gradient: Blue-cyan (#0099cc → #00d4ff)
- Muted Text: #7cbd9e (Muted teal) */


* {
    box-sizing: border-box;
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;

    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

.notes {
    margin-top: 6px;
    margin-bottom: 6px;
}

#fbCount {
    margin: 0px;
    /* min-width: 120px; */
}

.code-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#verification-code-buttons {
    display: flex;
    gap: 8px;
    margin-top: 0px;
}

#verifyBtn,
#resendBtn {
    display: flex;
    justify-content: center;
    align-items: center;
}

#addCourseBtn {
    margin-top: 0px;
}

.code-actions button {
    flex: 1;
    height: 40px;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
}

input,
button {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    /* margin-bottom: 10px; */
    border: none;
    border-radius: 8px;
    font-size: 14px;
}

button {
    background: var(--gradient-button);
    color: var(--text-white);
    cursor: pointer;
    transition: 0.2s;
    height: 40px;
}

button:hover {
    opacity: 0.9;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100dvh;
    /* display: flex;
    align-items: center;
    justify-content: center; */
    display: grid;
    place-items: center;
    padding: clamp(8px, 3vh, 24px);

    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;

    margin: 0px;
}

.card {
    position: relative;
    width: min(420px, 100%);
    background: var(--card);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 30px var(--shadow-dark);
    /* transform: scale(1.08); */
}

.btn {
    height: 44px;
}

@media (max-width: 420px) {
    body {
        padding: 12px;
    }

    .card {
        padding: 22px;
    }
}

h1 {
    text-align: center;
    margin: 0 0 6px;
    font-size: 20px;
}

p.lead {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 18px;
}

label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 12px 0 6px;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    font-size: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-light);
    color: inherit;
    outline: none;
}

.btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: var(--gradient-accent);
    color: var(--text-white);
    font-weight: 600;
    box-shadow: 0 6px 18px var(--shadow-accent);
}

.btn.secondary {
    background: var(--gradient-secondary);
    margin-top: 8px;
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

#error {
    font-size: 14px;
    min-height: 18px;
    margin-top: 10px;
    text-align: center;
    font-weight: 900;
    transition: none !important;
}

#email {}

.course-card {
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    background: var(--bg-light);
    font-size: 14px;
}

.small {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    text-align: center;
}

.message {
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: bold;
}

.message.error {
    color: var(--error-red);
}

.message.success {
    color: var(--success-green);
}

#helpBtn,
#themeBtn {
    position: absolute;
    top: 12px;

    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-white);
    font-weight: bold;
    font-size: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

#helpBtn {
    right: 12px;
}

#themeBtn {
    left: 12px;
}

#helpBtn:hover,
#themeBtn:hover {
    background: var(--accent-2);
}

button>img {
    filter: invert();
}

#themeBtn>img {
    max-width: 22px;
    max-height: 22px;
    transition: background 0.2s;
}

#course2,
#checkCourseBtn2 {
    display: none;
}

#checkCourseBtn1 {
    margin-bottom: 20px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    background: rgba(0, 0, 0, 0.6);
    transition: opacity .25s ease, visibility .25s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--card);
    border-radius: 10px;
    padding: 24px;
    max-width: 640px;
    width: 96%;
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 8px 30px var(--shadow-dark-2);

    transform: scale(0.96);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;

    max-height: 80vh;
    overflow: auto;
}

.modal-content h2 {
    font-size: 1.15rem;
    margin: 0 0 10px;
}

.modal.open .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content #close {
    position: absolute;
    font-size: 24px;
    top: 10px;
    right: 14px;
    color: var(--muted);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content #close:hover {
    color: var(--text-primary);
}

input::placeholder {
    font-size: 0.87em;
    opacity: 0.75;
}

input::-webkit-input-placeholder {
    font-size: 0.87em;
    opacity: 0.75;
}

input::-moz-placeholder {
    font-size: 0.87em;
    opacity: 0.75;
}

input:-ms-input-placeholder {
    font-size: 0.87em;
    opacity: 0.75;
}

input::-ms-input-placeholder {
    font-size: 0.87em;
    opacity: 0.75;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.copy-field {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 8px auto;
}

.copy-field input {
    width: 100%;
    height: 44px;
    padding: 0 112px 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border-light-3);
    background-color: var(--bg-light-2);
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    outline: none;
    font-size: 16px;
}

/* .copy-field button {
    position: absolute;
    top: 4px;
    right: 4px;

    width: auto !important;
    min-width: 86px;
    height: 36px;
    padding: 0 14px;

    border: none;
    border-radius: 8px;
    background: var(--gradient-accent);
    color: var(--text-white);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--shadow-accent);
    transition: opacity .2s, transform .02s;
}

.copy-field button:hover {
    opacity: .9;
}

.copy-field button:active {
    transform: translateY(1px);
}

.copy-field button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.feedback-block {
    margin-top: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-light-2);
    border-radius: 10px;
    padding: 12px;
}

.feedback-block label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 6px;
} */

#fbText {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-light-3);
    background: var(--bg-light-2);
    color: var(--text-primary);
    outline: none;
    line-height: 1.5;
}

#feedback-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

#feedback-actions .muted {
    color: var(--muted);
    font-size: 12px;
}

#fbSendBtn {
    /* margin-left: auto; */
    width: auto;
    min-width: 120px;
    height: 36px;
    padding: 0px;
    margin: 0px;
}

#fbMsg {
    flex: 1 1 auto;
    margin: 0;
    height: 1.2em;
    line-height: 1.2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}