/* ============================================================
   REMIX-RADIO – FULL DARK THEME + WCAG AAA + CLS-FIX
   ============================================================ */

/* ---------- Color Theme (WCAG AAA) ---------- */
:root {
    --bg-main: #14394d;
    --bg-alt: #1a4c66;
    --bg-card: #102a38;

    --primary: #e6b23c;
    --primary-dark: #c9972f;

    --text: #ffffff;
    --text-muted: #dfe6ea;

    --shadow: 0 4px 12px rgba(0,0,0,0.35);
    --radius: 14px;
    --transition: 0.2s ease;

    /* Matte Blue Button (B3) */
    --btn-bg: #0f3344;
    --btn-bg-hover: #14465c;
    --btn-border: #1a5a78;
}

/* ---------- Base Layout ---------- */
html {
    font-display: swap;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #1d4f68 0%, #14394d 40%, #0c2736 100%);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
    font-weight: 600;
}

a:hover {
    color: #ffdd7a;
}

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

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 30, 45, 0.95);
    border-bottom: 2px solid var(--primary);
    padding: 15px 10px 12px 10px;
    text-align: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header h1 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(230,178,60,0.7);
    font-weight: 700;
    line-height: 1.3;
}

header nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

header nav a,
header nav .dropbtn {
    padding: 6px 12px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.10);
    color: var(--text);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

header nav a:hover,
header nav .dropbtn:hover {
    background: var(--primary);
    color: #1b1300;
}

/* ============================================================
   LANGUAGE DROPDOWN
   ============================================================ */

.dropdown {
    position: relative;
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 110%;
    background: var(--bg-card);
    padding: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    min-width: 180px;
    z-index: 1000;
}

.dropbtn:focus + .dropdown-content,
.dropdown-content:hover {
    display: block;
    opacity: 1;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.dropdown-content img {
    width: 22px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

main {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    padding-top: 150px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ============================================================
   SECTIONS
   ============================================================ */

section,
.welcome-text {
    background: var(--bg-card);
    padding: 22px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);
}

section h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.35rem;
    color: var(--primary);
    text-shadow: 0 0 6px rgba(230,178,60,0.4);
}

/* ============================================================
   NOW PLAYING
   ============================================================ */

#nowPlayingBox {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#nowPlaying {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
    overflow-wrap: break-word;
}

/* ============================================================
   COMING NEXT
   ============================================================ */

#comingNext div {
    background: #0f3344;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    min-height: 60px;
    overflow-wrap: break-word;
}

/* ============================================================
   REQUEST + PLAYED (Modern Dark Theme)
   ============================================================ */

/* Search Bar */
#searchInput {
    width: 100%;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 2px solid rgba(255,255,255,0.18);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin: 10px 0 20px 0;
}

#search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(230,178,60,0.45);
    outline: none;
}

/* Pagination */
#pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#pagination a {
    background: var(--btn-bg);
    color: #ffffff;
    border: 1px solid var(--btn-border);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.25);
}

#pagination a:hover {
    background: var(--btn-bg-hover);
    border-color: #1f6f94;
    transform: translateY(-2px);
    box-shadow: 0 0 8px rgba(20,70,92,0.45);
}

#pagination .active {
    background: var(--primary);
    color: #1b1300;
}

/* Song List */
.song-list,
#playedList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    list-style: none;
}

/* Shared style for Request + Played items */
.song-item,
.played-item {
    background: #0f3344;
    padding: 14px 16px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    box-shadow: var(--shadow);
}

/* Titles */
.song-title,
.played-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.song-artist,
.played-time {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Buttons — Matte Blue (B3) */
.request-btn,
.played-btn {
    background: var(--btn-bg);
    color: #ffffff;
    border: 1px solid var(--btn-border);
    padding: 12px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    font-size: 1.05rem;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.25);
}

.request-btn:hover,
.played-btn:hover {
    background: var(--btn-bg-hover);
    border-color: #1f6f94;
    transform: translateY(-2px);
    box-shadow: 0 0 8px rgba(20,70,92,0.45);
}

/* ============================================================
   PLAYER
   ============================================================ */

.player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0d2533;
    border-top: 2px solid var(--primary);
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.35);
    z-index: 1000;
}

#playBtn {
    font-size: 1.6rem;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    padding: 6px 14px;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

#playBtn:hover {
    background: var(--btn-bg-hover);
    transform: translateY(-2px);
}

.playerInfo {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.progressBar {
    height: 6px;
    background: #24485f;
    border-radius: 5px;
    overflow: hidden;
    margin: 3px 0;
}

.progressBar div {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s;
}

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

@media (max-width: 600px) {

    header h1 {
        font-size: 1.25rem;
        padding: 0 10px;
    }

    .container {
        padding-bottom: 160px; /* or 180px depending on your player height */
    }

    .song-item,
    .played-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .request-btn,
    .played-btn {
        width: 100%;
        text-align: center;
    }

    .player {
        height: auto;
        flex-direction: column;
        padding-bottom: 12px;
    }

    #playBtn {
        width: 40%;
        text-align: center;
    }

    /* Make dropdown easier on mobile */
    .dropdown-content {
        left: auto;
        right: 0;
        transform: none;
    }
}
