:root {
    --bg-dark: #07080a;
    --card-bg: rgba(15, 17, 23, 0.92);
    --border-color: rgba(255, 255, 255, 0.08);
    --pink-neon: #ff2a85;
    --pink-glow: rgba(255, 42, 133, 0.35);
    --purple-glow: rgba(147, 51, 234, 0.2);
    --text-primary: #ffffff;
    --text-muted: #8d93a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.glow-bg {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 450px;
    background: radial-gradient(circle, var(--pink-glow) 0%, var(--purple-glow) 45%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(110px);
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 20px;
    border-bottom: none;
    backdrop-filter: blur(20px);
    flex-shrink: 0;
}

.brand-logo-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 0 20px var(--pink-glow);
}

.logo-text .highlight {
    color: var(--pink-neon);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px 16px 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

/* PLAYER CARD */
.player-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 30px 36px 26px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    overflow: hidden;
}

.player-main-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.player-left-info {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    overflow: hidden;
}

.cover-wrapper {
    position: relative;
    width: 105px;
    height: 105px;
    border-radius: 18px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.12);
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details {
    flex: 1;
    overflow: hidden;
}

.station-tagline {
    font-size: 11px;
    font-weight: 800;
    color: var(--pink-neon);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 4px;
}

.artist-name {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-title {
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* BUTON DE PLAY */
.play-btn {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff2a85 0%, #b80050 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 35px rgba(255, 42, 133, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
}

.play-btn:hover {
    transform: scale(1.08);
    background: linear-gradient(145deg, #ff4095 0%, #d80060 100%);
    box-shadow: 0 16px 45px rgba(255, 42, 133, 0.65), inset 0 2px 6px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.play-btn svg.hidden {
    display: none !important;
}

/* BARA DE VOLUM PERSONALIZATĂ & CHROMECAST */
.player-volume-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vol-icon-small {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0.8;
    transition: color 0.2s;
}

.player-volume-wrapper:hover .vol-icon-small {
    color: var(--text-primary);
    opacity: 1;
}

.custom-slider-track {
    position: relative;
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.custom-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 85%;
    background: var(--pink-neon);
    border-radius: 3px;
    pointer-events: none;
}

.custom-slider-thumb {
    position: absolute;
    left: 85%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 42, 133, 0.9), 0 2px 4px rgba(0,0,0,0.4);
    pointer-events: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.custom-slider-track:hover .custom-slider-thumb {
    transform: translateX(-50%) scale(1.3);
    background: var(--pink-neon);
}

/* =========================================
   GOOGLE CHROMECAST
   ========================================= */

google-cast-launcher {
    width: 26px;
    height: 26px;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    cursor: pointer;

    --disconnected-color: var(--text-muted);
    --connected-color: var(--pink-neon);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

google-cast-launcher:hover {
    opacity: 0.85;
    transform: scale(1.08);
}

google-cast-launcher:active {
    transform: scale(0.95);
}

google-cast-button:hover {
    opacity: 0.8;
}

/* Grilă Conținut */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    border-radius: 22px;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
}

.card-head {
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.card-head h2 {
    font-size: 16px;
    font-weight: 800;
}

.card-head .badge-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* RECENTLY PLAYED */
.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.history-item.is-live {
    border-color: var(--pink-glow);
    background: rgba(255, 42, 133, 0.07);
}

.history-item img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.history-item .details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.history-item .song-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item .artist-name-list {
    font-size: 11px;
    color: var(--text-muted);
}

.live-now-tag {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    color: var(--pink-neon);
    background: rgba(255, 42, 133, 0.15);
    padding: 3px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* TOP 20 LIST */
.top-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 335px;
    overflow-y: auto;
    padding-right: 4px;
}

.top-list::-webkit-scrollbar { width: 4px; }
.top-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.top-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid transparent;
}

.top-list .rank {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    width: 20px;
}

.top-list .song {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-list .song strong {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-list .song span {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Locul 1 - Aur */
.top-list li:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}
.top-list li:nth-child(1) .rank { color: #ffd700; font-size: 13px; }

/* Locul 2 - Argint */
.top-list li:nth-child(2) {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(192, 192, 192, 0.4);
}
.top-list li:nth-child(2) .rank { color: #e0e0e0; font-size: 13px; }

/* Locul 3 - Bronz */
.top-list li:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(205, 127, 50, 0.4);
}
.top-list li:nth-child(3) .rank { color: #cd7f32; font-size: 13px; }

/* Footer compact */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-email {
    color: var(--pink-neon);
    text-decoration: none;
    font-weight: 700;
}

.footer-email:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.social-btn:hover {
    color: var(--pink-neon);
    border-color: var(--pink-neon);
    box-shadow: 0 0 15px var(--pink-glow);
    transform: translateY(-2px);
}

.social-btn svg { width: 16px; height: 16px; }

/* Responsive Mobile */
@media (max-width: 768px) {
    html, body {
        height: auto;
        overflow-y: auto;
    }
    .navbar { padding: 12px 5%; }
    .container { padding: 12px; gap: 14px; }
    .player-card { padding: 22px 20px; gap: 16px; }
    .player-main-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .player-left-info {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .track-details { width: 100%; }
    .song-title { font-size: 20px; }
    .play-btn { width: 72px; height: 72px; }
    .play-btn svg { width: 30px; height: 30px; }
    .content-grid { grid-template-columns: 1fr; gap: 14px; }
    .top-list { max-height: 280px; }
}

google-cast-button {
    display: inline-block !important;
    visibility: visible !important;
}