/* ========================================
   ROOT VARIABLES
======================================== */
:root {

    --primary: #0d6efd;
    --primary-dark: #084298;

    --accent: #ffc107;
    --accent-dark: #e0a800;

    --success: #1ed760;
    --danger: #ff5f57;

    --bg: #0f1117;
    --surface: #181b23;
    --surface-2: #20232d;

    --border: rgba(255,255,255,0.08);

    --text: #f5f7fa;
    --text-soft: #aab2c0;

    --shadow:
        0 10px 35px rgba(0,0,0,0.35);

    --radius: 18px;

}

/* ========================================
   GLOBAL RESET
======================================== */
*,
*::before,
*::after {

    box-sizing: border-box;

}

html {

    font-size: clamp(14px, 1vw + 0.5rem, 16px);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

}

body {

    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(circle at top left,
            rgba(13,110,253,0.18),
            transparent 28%),

        radial-gradient(circle at top right,
            rgba(255,193,7,0.08),
            transparent 30%),

        var(--bg);

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

    padding: 32px;

    line-height: 1.65;

}

/* ========================================
   APP WRAPPER
======================================== */
.media-shell {

    width: 100%;
    max-width: 1400px;

}

.media-card {

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.03),
            rgba(255,255,255,0.015)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow: var(--shadow);

    backdrop-filter: blur(18px);

}

/* ========================================
   HEADER
======================================== */
.media-header {

    padding: 28px 32px;

    border-bottom: 1px solid var(--border);

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

    gap: 18px;

}

.media-title-group {

    display: flex;
    flex-direction: column;
    gap: 6px;

}

.media-title {

    margin: 0;

    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;

    letter-spacing: -0.03em;

}

.media-subtitle {

    color: var(--text-soft);

    font-size: 0.95rem;

}

.live-badge {

    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 18px;

    border-radius: 999px;

    background:
        rgba(30,215,96,0.12);

    border:
        1px solid rgba(30,215,96,0.28);

    color: #7dffae;

    font-size: 0.9rem;
    font-weight: 700;

    letter-spacing: 0.05em;

    text-transform: uppercase;

}

.live-dot {

    width: 10px;
    height: 10px;

    background: var(--success);

    border-radius: 50%;

    animation: pulse 2s infinite;

}

@keyframes pulse {

    0% {
        box-shadow: 0 0 0 0 rgba(30,215,96,0.65);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(30,215,96,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(30,215,96,0);
    }

}

/* ========================================
   CONTENT
======================================== */
.media-content {

    padding: 32px;

}

/* ========================================
   VIDEO PANEL
======================================== */
.player-panel {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 22px;

}

/* ========================================
   VIDEO PLAYER
======================================== */
video {

    width: 100%;
    max-height: 75vh;

    display: block;

    background: #000;

    border-radius: 14px;

    border: 1px solid rgba(255,255,255,0.08);

    overflow: hidden;

}

/* ========================================
   TRACK INFO
======================================== */
#trackInfo {

    margin-top: 18px;

    padding: 16px 18px;

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

    border:
        1px solid var(--border);

    border-radius: 12px;

    color: var(--text-soft);

    font-size: 0.95rem;

    line-height: 1.5;

    word-break: break-word;

}

/* ========================================
   CONTROLS
======================================== */
.controls {

    margin-top: 24px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 14px;

}

/* ========================================
   BUTTONS
======================================== */
.arrow-btn {

    appearance: none;
    border: none;

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

    padding: 14px 22px;

    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            var(--accent),
            var(--accent-dark)
        );

    color: #1c1c1c;

    font-size: 0.95rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;

}

.arrow-btn:hover {

    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(255,193,7,0.25);

}

.arrow-btn:active {

    transform: scale(0.98);

}

.arrow-btn:focus-visible {

    outline: 3px solid rgba(255,193,7,0.55);
    outline-offset: 2px;

}

/* ========================================
   PLAYLIST / SIDEBAR
======================================== */
.media-playlist {

    margin-top: 30px;

    display: grid;
    gap: 14px;

}

.playlist-item {

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

    padding: 16px 18px;

    background: var(--surface-2);

    border:
        1px solid var(--border);

    border-radius: 14px;

    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;

}

.playlist-item:hover {

    transform: translateY(-2px);

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

    border-color:
        rgba(255,255,255,0.16);

}

.playlist-meta {

    min-width: 0;

}

.playlist-title {

    display: block;

    font-weight: 700;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.playlist-subtitle {

    margin-top: 4px;

    color: var(--text-soft);

    font-size: 0.88rem;

}

.play-btn {

    flex-shrink: 0;

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

    padding: 10px 16px;

    border-radius: 10px;

    text-decoration: none;

    background:
        rgba(13,110,253,0.14);

    border:
        1px solid rgba(13,110,253,0.25);

    color: #7db7ff;

    font-weight: 700;
    font-size: 0.92rem;

    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;

}

.play-btn:hover {

    transform: translateY(-1px);

    background:
        rgba(13,110,253,0.24);

    border-color:
        rgba(13,110,253,0.4);

}

/* ========================================
   FOOTER
======================================== */
.media-footer {

    padding: 20px 28px;

    border-top: 1px solid var(--border);

    text-align: center;

    color: var(--text-soft);

    font-size: 0.85rem;

}

/* ========================================
   SCROLLBAR
======================================== */
::-webkit-scrollbar {

    width: 10px;

}

::-webkit-scrollbar-thumb {

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

    border-radius: 999px;

}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 900px) {

    body {

        padding: 18px;

    }

    .media-header,
    .media-content {

        padding: 22px;

    }

    .playlist-item {

        flex-direction: column;
        align-items: stretch;

    }

    .play-btn {

        width: 100%;

    }

}

@media (max-width: 600px) {

    .controls {

        flex-direction: column;

    }

    .arrow-btn {

        width: 100%;

    }

    .media-title {

        font-size: 1.8rem;

    }

}