/* ---------- Light Theme ---------- */
:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-light: #6b7280;
    --accent: #0d6efd;
    --accent-hover: #0b5ed7;
    --success: #22c55e;
    --shadow: 0 8px 24px rgba(0,0,0,.06);
    --radius: 12px;
    --transition: 0.15s ease-in-out;
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    padding: 24px;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Top Bar — make it as wide as the main stage */
.topbar {
    /* was max-width:1200px; */
    max-width: 1800px; /* match .container */
    width: 100%;
    margin: 0 auto 12px auto;
    padding: 0 8px; /* small side padding */
    display: flex;
    align-items: center;
    justify-content: space-between; /* bubble hard-left, buttons hard-right */
    gap: 12px;
}

/* Profile Icon (unchanged) */
.profile-bubble {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    user-select: none;
    box-shadow: var(--shadow);
}

/* Right-side actions: keep them tight to the right edge */
.topbar-actions {
    margin-left: auto; /* push all the way right */
    display: flex;
    gap: 10px;
}

/* Pill buttons: no underline + never wrap */
.btn-pill,
.btn-pill:link,
.btn-pill:visited,
.btn-pill:hover,
.btn-pill:focus,
.btn-pill:active {
    text-decoration: none; /* remove underline on <a> */
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    font-weight: 400; /* <-- Normal weight */
    color: var(--accent-hover);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none !important;
}


    .btn-pill:hover {
        background: #e9f2ff;
        border-color: var(--accent);
    }



    .btn-pill.copied {
        background: var(--success) !important;
        color: #fff !important;
        border-color: var(--success) !important;
    }

a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-hover)
    }




/* "Copied!" state */
.btn.copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #fff !important;
}

/* Main Centered Layout */
.container {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
}

#player {
    flex: 0 1 2000px;
    width: min(100%, 20000px);
    height: auto;
    border-radius: var(--radius);
    position: relative;
    background: #000;
    overflow: hidden;
    box-shadow: var(--shadow);
}
    /* Maintain 16:9 ratio no matter what */

    #player::before {
        content: "";
        display: block;
        padding-top: 56.25%; /* 16/9 ratio */
    }
    /* Force iframe to fill container 100% */

    #player iframe {
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
        border: none;
    }

/* Notes Panel */
.notes-panel {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 190px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .notes-header h3 {
        margin: 0;
        font-size: 18px;
    }

    .notes-header .muted {
        font-size: 12px;
        color: var(--text-light)
    }

/* Scrollable Notes */
#note-list {
    flex: 1 1 auto;
    min-height: 520px;
    margin-top: 10px;
    padding-right: 6px;
    overflow-y: auto;
    background: #fafafa;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

/* Individual Note */
.note {
    background: #fff;
    border: 1px solid var(--border);
    margin: 10px 8px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

    .note:hover {
        transform: translateX(4px);
        box-shadow: 0 6px 14px rgba(0,0,0,.05);
    }

    .note.active {
        border-color: #ffd24d;
        box-shadow: 0 6px 16px rgba(255,210,77,.25);
    }

.muted {
    color: var(--text-light);
    font-size: 12px
}

/* Note Input + Buttons */
#note-input {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    resize: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}

.row {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

    .btn:hover {
        background: #f2f6ff;
        border-color: #cfe0ff;
    }
.btn-share {
    padding: 6px 12px;
    max-width: 150px;
    border-radius: 8px;
}


/* Responsive stacking for smaller screens */
@media(max-width:1250px) {
    .container {
        flex-direction: column
    }

    .notes-panel {
        width: 100%;
        max-height: none
    }
}
.profile-menu {
    position: absolute;
    top: 60px;
    left: 24px;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px 0;
    display: none;
    z-index: 999;
}

.menu-header {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    color: var(--text-light);
}

#recentVideosList {
    list-style: none;
    margin: 0;
    padding: 0;
}

    #recentVideosList li a {
        display: block;
        padding: 10px 14px;
        color: var(--text);
        text-decoration: none;
        border-radius: 8px;
        transition: var(--transition);
        font-size: 14px;
    }

        #recentVideosList li a:hover {
            background: #eef4ff;
            color: var(--accent);
        }

.menu-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--border);
}

.menu-logout {
    display: block;
    padding: 10px 14px;
    color: #d13232;
    text-decoration: none;
    font-weight: 600;
}

    .menu-logout:hover {
        background: #ffe6e6;
    }
.no-vod-message {
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 24px;
    height: 100%;
    opacity: 0.8;
}
.login-box {
    max-width: 340px;
    margin: 120px auto;
    padding: 24px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

    .login-box h2 {
        margin-bottom: 16px;
    }

    .login-box input {
        width: 100%;
        padding: 10px;
        margin-top: 10px;
        border-radius: 8px;
        border: 1px solid var(--border);
    }

.error {
    color: red;
    margin-bottom: 10px;
}
/* --- Modal Popup --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    z-index: 1000;
}
    .modal.show {
        display: flex;
    }
.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
}

    .modal-content h2 {
        margin: 0 0 10px;
        font-size: 20px;
    }

    .modal-content input {
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }

.modal-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-cancel {
    padding: 10px 16px;
    background: #ddd;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
.filters { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); z-index: 1000; }
.filters.hidden { display: none; }
.filters-card { width: min(520px, 92vw); background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.2); padding: 16px; }
.filters-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.filters-body .row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.filters-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn-close { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; }
