:root {
    --bg: #05060a;
    --bg-alt: #0b0c12;

    --text: #f5f5ff;
    --muted: #9a9ab5;

    --accent: #7c5cff;
    --radius: 18px;

    --btn-bg: #1a1b27;
    --btn-border: #3b3d55;
    --btn-hover: #5d5fff;
    --btn-glow: rgba(93, 95, 255, 0.55);
}

/* BACKGROUND */
body {
    margin: 0;
    padding: 40px;
    font-family: "Inter", sans-serif;
    color: var(--text);

    background: linear-gradient(135deg, #05060a, #0b0c12, #1a1b27);
    background-size: 300% 300%;
    animation: bgFlow 22s ease infinite;
}

@keyframes bgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* HEADER */
.header {
    text-align: center;
    font-size: 2.8rem;
    padding: 25px 0;
    margin-bottom: 40px;

    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 25px rgba(0,0,0,0.35);
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* CARD */
.card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(18px);
    border-radius: 20px;
    padding: 20px;

    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 25px rgba(0,0,0,0.35);

    transition: 0.25s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn .6s ease forwards;
}

.card:nth-child(odd) { animation-delay: .1s; }
.card:nth-child(even) { animation-delay: .2s; }

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 35px rgba(124,92,255,0.35);
}

/* CARD PLAYING */
.card.playing {
    box-shadow: 0 0 40px rgba(124,92,255,0.55);
    border-color: rgba(124,92,255,0.4);
}

/* THUMBNAIL */
.thumb {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 15px;
    transition: 0.3s ease;
}

.card:hover .thumb {
    transform: scale(1.03);
    filter: brightness(1.15);
}

/* TITLE */
.title {
    margin: 0 0 15px;
    font-size: 1.2rem;
}

/* CONTROLS */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius);

    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);

    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:hover {
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 12px rgba(124,92,255,0.4);
}

/* EMERGENCY */
.emergency {
    background: rgba(255,0,0,0.15);
    border-color: rgba(255,0,0,0.35);
}

.emergency:hover {
    background: rgba(255,0,0,0.25);
    box-shadow: 0 0 15px rgba(255,0,0,0.5);
}

/* PROGRESS BAR */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.time {
    font-size: 0.85rem;
    color: var(--muted);
    width: 40px;
    text-align: center;
}

.progress {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    -webkit-appearance: none;
}

.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(124,92,255,0.6);
}

/* VOLUME */
.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.volume {
    flex: 1;
    height: 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    -webkit-appearance: none;
}

.volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
}

/* VISUALIZER */
.visualizer {
    width: 100%;
    height: 40px;
    margin: 10px 0;
    display: block;
    filter: drop-shadow(0 0 6px rgba(124,92,255,0.5));
}
