/* ============================================================
   BRUHXSTON song requests — shared styles
   Palette pulled from the channel: sky blue, hot-sauce red,
   a navy ink, and the banner's yellow spark.
   ============================================================ */

:root {
    --sky: #5ac9f6;
    --sky-deep: #1e84d6;
    --sky-edge: #1568b0;
    --sauce: #e63946;
    --sauce-deep: #c42e3a;
    --ink: #14233b;
    --mute: #6b7c93;
    --line: #e4ebf2;
    --card: #ffffff;
    --spark: #ffd23f;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(20, 35, 59, 0.12);
    --shadow-sm: 0 3px 10px rgba(20, 35, 59, 0.08);

    --font-display: "Fredoka", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--sky);
    /* the banner sits on this same blue, so it blends into the page */
    background: linear-gradient(180deg, #5ac9f6 0%, #5ac9f6 30%, #eaf6fd 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: var(--sky-deep);
}

.wrap {
    width: min(960px, 92vw);
    margin: 0 auto;
}

/* ---------- Masthead: the channel banner ---------- */

.masthead {
    padding: 26px 0 88px;
}

.banner {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
    /* the banner art is already sky-blue edge-to-edge; a soft shadow lifts it */
    filter: drop-shadow(0 8px 18px rgba(20, 35, 59, 0.18));
}

.masthead .tagline {
    margin: 20px auto 0;
    color: #103a5c;
    font-size: clamp(16px, 2.4vw, 20px);
    font-weight: 700;
    max-width: 34ch;
    text-align: center;
}

/* ---------- Submit panel (overlaps the masthead) ---------- */

.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    margin-top: -56px;
    position: relative;
    animation: rise .5s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.panel h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin: 0 0 4px;
}

.panel .sub {
    color: var(--mute);
    margin: 0 0 18px;
    font-size: 15px;
}

.requestbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.requestbar input[type="url"] {
    flex: 1 1 280px;
    font-family: var(--font-body);
    font-size: 16px;
    padding: 13px 15px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    transition: border-color .15s;
}

.requestbar input[type="url"]:focus {
    outline: none;
    border-color: var(--sky-deep);
    box-shadow: 0 0 0 4px rgba(30, 132, 214, .15);
}

/* ---------- Buttons ---------- */

.btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 22px;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .12s;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sauce {
    background: var(--sauce);
    color: #fff;
    box-shadow: 0 4px 0 var(--sauce-deep);
}

.btn-sauce:hover {
    background: #ef4753;
}

.btn-sauce:disabled {
    background: #cdd6e0;
    box-shadow: 0 4px 0 #b4bfca;
    cursor: not-allowed;
}

.btn-twitch {
    background: #9146ff;
    color: #fff;
    box-shadow: 0 4px 0 #6f33c9;
    width: 100%;
    justify-content: center;
    font-size: 17px;
    padding: 15px;
}

.btn-twitch:hover {
    background: #9d59ff;
}

/* ---------- Hot-sauce request meter (the signature) ---------- */

.meter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-size: 14px;
    color: var(--mute);
    font-weight: 700;
}

.drops {
    display: flex;
    gap: 5px;
}

.drop {
    width: 18px;
    height: 22px;
    transition: transform .2s;
}

.drop.full {
    transform: scale(1.05);
}

.meter .count {
    font-family: var(--font-display);
    color: var(--ink);
}

.feedback {
    margin: 14px 2px 0;
    font-size: 15px;
    font-weight: 600;
    min-height: 1.2em;
}

.feedback.err {
    color: var(--sauce-deep);
}

.feedback.ok {
    color: #1f9d57;
}

.whoami {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.whoami .hi {
    font-weight: 700;
}

.whoami .out {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--mute);
    text-decoration: none;
}

.whoami .out:hover {
    color: var(--sauce-deep);
}

/* ---------- Tabs: queue (default) + played tonight ---------- */

.tabs {
    display: flex;
    gap: 8px;
    margin: 30px 0 16px;
}

.tab {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    padding: 11px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
    color: #285178;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background .12s, color .12s, transform .12s;
}

.tab:hover {
    transform: translateY(-1px);
}

.tab.active {
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.tabcount {
    background: #eef4f9;
    color: var(--sky-edge);
    border-radius: 20px;
    font-size: 13px;
    padding: 1px 9px;
}

.tab.active .tabcount {
    background: var(--sauce);
    color: #fff;
}

/* ---------- Song rows ---------- */

.songlist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song {
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 5px solid var(--line);
    transition: transform .12s, box-shadow .12s;
}

.song:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.song.played {
    border-left-color: var(--sauce);
}

.song.queued {
    border-left-color: var(--sky-deep);
}

.song .body {
    min-width: 0;
    flex: 1;
}

.song .title {
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song .by {
    color: var(--mute);
    font-size: 13px;
    font-weight: 600;
}

.dur {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 13px;
    background: #eef4f9;
    color: var(--sky-edge);
    border-radius: 20px;
    padding: 2px 10px;
    flex: 0 0 auto;
}

.iconbtn {
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    transition: background .12s, transform .12s;
    background: #eef4f9;
    color: var(--sky-deep);
    text-decoration: none;
}

.iconbtn:hover {
    transform: translateY(-1px);
}

.iconbtn.play:hover {
    background: #e1eefb;
}

.iconbtn.done {
    background: #e4f7ec;
    color: #1f9d57;
}

.iconbtn.done:hover {
    background: #d2f0de;
}

.iconbtn.del {
    background: #fde9eb;
    color: var(--sauce-deep);
}

.iconbtn.del:hover {
    background: #fbd9dd;
}

.empty {
    background: rgba(255, 255, 255, .55);
    border: 2px dashed rgba(255, 255, 255, .85);
    border-radius: var(--radius-sm);
    padding: 22px 16px;
    text-align: center;
    color: #285178;
    font-weight: 700;
    font-size: 14px;
}

/* ---------- Footer ---------- */

.foot {
    text-align: center;
    padding: 30px 0 50px;
    color: #2c5078;
}

.foot a.history-link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: #fff;
    background: var(--sauce);
    text-decoration: none;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 0 var(--sauce-deep);
    display: inline-flex;
    gap: 9px;
    align-items: center;
}

.foot a.history-link:hover {
    background: #ef4753;
}

.foot .note {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    opacity: .8;
}

/* ---------- Calendar (history page) ---------- */

.backlink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #103a5c;
    font-weight: 800;
    text-decoration: none;
    margin: 26px 0 4px;
}

.backlink:hover {
    color: var(--sauce-deep);
}

.calnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 8px 0 18px;
}

.calnav h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    color: #103a5c;
    margin: 0;
    min-width: 220px;
    text-align: center;
}

.calnav button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, .85);
    color: var(--sky-edge);
    font-size: 20px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform .12s, background .12s;
}

.calnav button:hover {
    transform: scale(1.08);
    background: #fff;
}

.calendar {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.calgrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.dow {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--mute);
    font-size: 13px;
    padding-bottom: 6px;
}

.cell {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    position: relative;
    font-weight: 700;
    color: var(--ink);
    background: #f5f8fb;
}

.cell.blank {
    background: transparent;
}

.cell.has {
    background: var(--sauce);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--sauce-deep);
    transition: transform .12s;
}

.cell.has:hover {
    transform: translateY(-2px);
}

.cell.has.sel {
    outline: 3px solid var(--spark);
    outline-offset: 2px;
}

.cell .cnt {
    position: absolute;
    bottom: 5px;
    right: 7px;
    font-size: 10px;
    font-weight: 800;
    opacity: .85;
}

.daypanel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin: 20px 0 50px;
}

.daypanel h3 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 14px;
    font-size: 20px;
}

/* ---------- Accessibility ---------- */

:focus-visible {
    outline: 3px solid var(--spark);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}