/* Modern UI for Radio Wunison */
:root {
    --primary-color: #4ecdc4;
    --secondary-color: #ff6b6b;
    --bg-overlay: rgba(20, 20, 20, 0.85);
    --text-color: #ffffff;
    --border-radius: 12px;
    --blur-amount: 10px;
    --spacing: 16px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
    background-color: #1e1e1e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
}

/* ================================
   Ad mode
   - blur/dim background
   - hide distracting UI (globe labels, side buttons, adsense)
================================ */
.ad-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9; /* below player controls (10), above globe canvas (0) */
    background: rgba(0,0,0,0.62);
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
    /* blur what's behind (supported browsers) */
    backdrop-filter: blur(14px) saturate(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
}
body[data-ad-active="1"] .ad-backdrop {
    display: block !important;
    opacity: 1;
    pointer-events: auto; /* block interactions with background */
}

body[data-ad-active="1"] .center-circle,
body[data-ad-active="1"] #center-preview-label,
body[data-ad-active="1"] #point-active-label {
    opacity: 0 !important;
    display: none !important;
}

/* Fade the globe canvas so it doesn't distract even through blur */
body[data-ad-active="1"] canvas {
    opacity: 0.10;
    filter: blur(1.5px) saturate(0.9);
}

/* Hide right-side auxiliary controls (search/zoom/cosmos/location) during ads */
body[data-ad-active="1"] .aux-controls-right {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(8px);
}

/* Hide station header area (count/name/favorite) so only ad + playback remain */
body[data-ad-active="1"] .station-info-container {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-6px);
}

/* Hide AdSense slots during pre-roll */
body[data-ad-active="1"] #adsense-header,
body[data-ad-active="1"] #adsense-sidebar,
body[data-ad-active="1"] #adsense-footer {
    display: none !important;
}

/* Google IMA SDK overlay container */
#ad-container.ima-ad-container {
    position: fixed;
    inset: 0;
    z-index: 10050; /* above player + blur backdrop */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.88);
}
body[data-ima-active="1"] #ad-container.ima-ad-container {
    display: flex !important;
}
#ad-container.ima-ad-container video {
    width: min(92vw, 720px);
    height: min(92vh, 720px);
    border-radius: 18px;
    background: #000;
    outline: none;
}

/* IMA SDK native controls styling - asigură că controalele sunt vizibile */
#ad-container.ima-ad-container .ima-controls-div,
#ad-container.ima-ad-container .ima-controls-div * {
    z-index: 10060 !important;
    pointer-events: auto !important;
}

/* Progress bar pentru ad-uri (dacă IMA SDK nu afișează automat) */
#ad-container.ima-ad-container .ima-ad-container {
    position: relative;
}

/* Asigură că butonul de skip este vizibil */
#ad-container.ima-ad-container .ima-skip-button {
    z-index: 10061 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

#ad-container .ima-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#ad-container .ima-loading-card {
    width: min(90vw, 420px);
    padding: 18px 16px;
    border-radius: 16px;
    background: rgba(15, 17, 21, 0.72);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(10px);
    text-align: center;
}
#ad-container .ima-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px auto;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.18);
    border-top-color: rgba(255,255,255,0.85);
    animation: ima-spin 900ms linear infinite;
}
@keyframes ima-spin {
    to { transform: rotate(360deg); }
}
#ad-container .ima-loading-title {
    font-size: 14px;
    font-weight: 800;
    opacity: 0.98;
}
#ad-container .ima-loading-subtitle {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 650;
    opacity: 0.82;
}



/* Globe Container */
.center-circle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    pointer-events: none;
    z-index: 3; /* Deasupra canvas-ului */
    /* OPTIMIZARE: will-change pentru performanță */
    will-change: transform, opacity;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure no margin or padding affects centering */
    margin: 0;
    padding: 0;
}

.center-reticle {
    width: 28px;
    height: 28px;
    overflow: visible;
    opacity: 0.9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Ensure perfect centering */
    margin: 0;
    padding: 0;
}
.center-reticle path {
    fill: none;
    stroke: rgba(255,255,255,0.95);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Label stabil lângă reticul (pentru drag/glide) */
/* OPTIMIZARE LCP: Elementul este în HTML inițial, nu creat dinamic */
.center-preview-label {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 18px));
    z-index: 15;
    display: none;
    pointer-events: none;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
    white-space: nowrap;
    /* OPTIMIZARE LCP: Excludem PERMANENT de la LCP - folosim content-visibility: hidden */
    /* Când elementul este vizibil (display: block), JavaScript va suprascrie cu 'visible' */
    content-visibility: hidden;
    contain-intrinsic-size: 0;
    contain: layout style paint;
    /* IMPORTANT: Excludem explicit de la LCP - elementul nu trebuie să fie considerat LCP */
    will-change: auto;
}

/* Mobile fix: dynamic viewport units (bara de adresă poate schimba "centrul" vizibil) */
@supports (height: 1dvh) {
    .center-circle {
        top: 50dvh;
        left: 50dvw;
    }
}

.center-circle .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none; /* vizibil doar când încărcăm */
    transform-origin: center center;
    box-sizing: border-box;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ascunde doar loader-ul când se încarcă, păstrează cercul vizibil (din backup) */
.center-circle.loaded .loader {
    display: none; /* Ascunde loader-ul după încărcare */
}

.center-circle.loading .loader {
    display: block;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Ad media layer (video behind controls, like Spotify) */
#ad-media-layer {
    position: fixed;
    inset: 0;
    z-index: 6; /* above globe canvas (0), below controls (10) */
    display: none;
    pointer-events: none; /* keep OUR controls clickable */
    background: rgba(0,0,0,0.12);
}
#ad-media-layer.is-active {
    display: block;
}
#ad-media-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38; /* subtle */
    filter: saturate(1.05) contrast(1.02);
}

/* UI Layer */
.player-controls-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 1; /* IMPORTANT: vizibil din start pentru LCP (nu blocăm primul paint) */
    width: 100%;
    z-index: 10;
    padding: var(--spacing);
    padding-bottom: max(var(--spacing), env(safe-area-inset-bottom));
    /* și mai light (să nu întunece ecranul) */
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px; /* spacing uniform între info / linie / controls */
    align-items: center;
    will-change: transform;
}

/* Wrapper care se potrivește pe lățimea butoanelor (dar nu depășește ecranul) */
.player-controls-inner {
    width: fit-content;
    max-width: 92vw;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* schimbat de la center pentru a permite liniei să se întindă */
    gap: 0; /* eliminăm gap-ul pentru control mai bun al distanțelor */
    overflow: visible !important; /* asigură că linia nu este tăiată */
    position: relative;
}

/* Intro UI animation: doar pe transform (nu afectăm LCP prin opacity) */



.station-info-container {
    /* Layout simetric: stânga / centru / dreapta */
    display: grid;
    /* se potrivește pe lățimea butoanelor; păstrează textul centrat */
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 12px; /* distanță armonioasă între elemente */
    width: 100%;
    min-width: 0; /* permite containerului să se adapteze la lățimea părinte */
    max-width: 100%; /* asigură că nu depășește lățimea liniei */
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    min-height: 44px; /* ajustat pentru armonie */
    padding: 4px 0; /* padding vertical pentru spațiere armonioasă */
    box-sizing: border-box; /* asigură că padding-ul este inclus în lățime */
}

/* Spotify-like ad card inside our player */
.ad-hero {
    /* square / tall hero so image/video looks premium */
    width: min(92vw, 70vh, 720px);
    aspect-ratio: 1 / 1;
    max-width: 720px;
    margin: 10px auto 10px auto;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    position: relative;
}
.ad-hero-link {
    display: block;
    width: 100%;
    height: 100%;
}
.ad-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Soft gradient for text readability (no visible container) */
.ad-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.00) 38%,
        rgba(0,0,0,0.32) 62%,
        rgba(0,0,0,0.70) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.ad-card {
    /* overlay layout (no card background/border) */
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2; /* above gradient */
    width: auto;
    display: grid;
    --ad-art-size: clamp(40px, 8vw, 70px);
    grid-template-columns: var(--ad-art-size) 1fr;
    gap: 12px;
    align-items: center;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
}
.ad-card-media {
    display: block;
    width: var(--ad-art-size);
    height: var(--ad-art-size);
    /* not “boxed”: no visible container at all */
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
}
.ad-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* keep subtle rounding on the image itself (Spotify-like), without a frame */
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.ad-card-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ad-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ad-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}
.ad-card-brand {
    font-size: 15px;
    font-weight: 800;
    opacity: 0.98;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 12px rgba(0,0,0,0.65);
}
.ad-card-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.ad-card-title {
    font-size: 14px;
    font-weight: 650;
    opacity: 0.92;
    line-height: 1.25;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 12px rgba(0,0,0,0.65);
}
.ad-card-cta {
    align-self: flex-end;
    font-size: 13px;
    font-weight: 800;
    color: rgba(15, 17, 21, 0.95);
    background: rgba(255,255,255,0.92);
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
}
.ad-card-cta:active {
    transform: scale(0.98);
}

/* Ad times row under progress line */
.ad-time-row {
    width: min(92vw, 70vh, 720px);
    max-width: 720px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px auto 10px auto;
    opacity: 0.9;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.ad-time {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.78);
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.station-count {
    font-size: 0.85rem; /* ușor mai mare pentru claritate */
    opacity: 0.8; /* ușor mai vizibil */
    margin-bottom: 0;
    white-space: nowrap;
    /* aproape de marginea stângă a containerului */
    justify-self: start;
    font-variant-numeric: tabular-nums;
    min-width: 60px; /* stabil (fără jump) */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0; /* padding pentru aliniere verticală */
}

.station-count-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    opacity: 0.9;
}

.station-info {
    min-width: 0; /* necesar pentru ellipsis */
    justify-self: center;
    width: 100%;
    position: relative;
}

.station-info-hint {
    position: absolute;
    left: 50%;
    top: -18px; /* apare deasupra numelui, fără să schimbe layout */
    transform: translateX(-50%);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.station-info-hint.show {
    opacity: 0.9;
    transform: translateX(-50%) translateY(-1px);
}

.station-info-hint.success {
    color: rgba(255, 255, 255, 0.92);
}

.station-info-hint.info {
    color: rgba(255, 255, 255, 0.86);
}

.station-info-hint.error {
    /* mai calm (fără roșu strident) */
    color: rgba(255, 255, 255, 0.78);
}
.station-info-text {
    font-size: 1.2rem; /* redus pentru a fi mai mic */
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* OPTIMIZARE LCP: Mărim dimensiunea pentru a fi LCP mai bun */
    min-height: 2em;
    line-height: 1.5;
    padding: 0.25em 0; /* Adăugăm padding vertical pentru a mări dimensiunea */
    max-width: 100%;
    text-align: center;
    line-height: 1.25;
    /* OPTIMIZARE LCP: Eliminăm will-change și transition pentru renderare imediată */
    /* Tranzițiile vor fi aplicate doar când este necesar (nu la încărcare) */
}

.station-favorite-icon {
    flex: 0 0 auto;
    white-space: nowrap;
    /* aliniat cu sfârșitul liniei, nu mai departe */
    justify-self: end;
    min-width: 36px; /* stabil (fără jump), ușor mai mare */
    width: 36px;
    height: 36px;
    padding: 6px; /* padding pentru aliniere verticală */
    display: inline-flex;
    align-items: center;
    justify-content: center; /* centrare perfectă */
    margin-right: 0; /* asigură că nu iese mai departe de linie */
    margin-left: 0;
    color: rgba(255, 255, 255, 0.78);
    position: relative;
    box-sizing: border-box; /* asigură că padding-ul este inclus în lățime */
    /* Mobile: reduce long-press callouts / delays */
    touch-action: manipulation;
    -webkit-touch-callout: none;
}

/* Small indicator when "favorites-only mode" is enabled */
.station-favorite-icon[data-favorites-only="true"]::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    opacity: 0.9;
}

/* Removed old .favorites-only-toggle styles - now using .toggle-switch */

/* Remove “green glow” focus ring on the star; keep a subtle white focus */
.station-favorite-icon:focus-visible {
    /* IMPORTANT: fără “pătrățel”/outline la interacțiune */
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

.station-favorite-icon:focus {
    outline: none !important;
    box-shadow: none !important;
}

.station-favorite-icon:active {
    transform: none;
}

.station-favorite-svg {
    /* ușor mai mare pentru claritate */
    width: 18px;
    height: 18px;
    display: block;
}

.station-favorite-svg .star-outline {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.station-favorite-svg .star-fill {
    fill: currentColor;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.station-favorite-icon.is-favorite {
    color: rgba(255, 255, 255, 0.95);
}

.station-favorite-icon.is-favorite .station-favorite-svg .star-fill {
    opacity: 1;
}

/* Dezactivată: culoarea radioului mic (nu alb complet) */
.station-favorite-icon:not(.is-favorite) {
    color: rgba(255, 255, 255, 0.78);
}
/* Hover label pentru puncte (city + country) - nu devine LCP: display none până la hover real */
.point-hover-label {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 22px)); /* și mai sus de punct */
    z-index: 15;
    display: none;
    pointer-events: none;
    padding: 0;
    border-radius: 0;
    background: transparent; /* fără fundal negru */
    /* OPTIMIZARE LCP: Excludem PERMANENT de la LCP - folosim content-visibility: hidden */
    content-visibility: hidden;
    contain-intrinsic-size: 0;
    contain: layout style paint;
    will-change: auto;
    border: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85); /* lizibil fără fundal */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    white-space: nowrap;
}

/* Label pinned pe punctul activ (selectat) */
/* OPTIMIZARE LCP: Elementul este în HTML inițial, nu creat dinamic */
.point-active-label {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 24px));
    z-index: 15;
    display: none;
    pointer-events: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    /* OPTIMIZARE LCP: content-visibility pentru a nu afecta LCP când e hidden */
    content-visibility: auto;
    contain-intrinsic-size: auto 20px;
}

.player-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    width: auto; /* se strânge după conținut */
    position: relative;
    overflow: visible !important; /* asigură că linia nu este tăiată */
    z-index: 101; /* peste linia de redare (100) ca volumul deschis în sus să apară deasupra */
}

.player-controls-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Action Buttons Row */
.action-buttons-row {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.action-buttons-row.show {
    display: flex;
    max-height: 100px;
    opacity: 1;
    padding: 8px 0;
    animation: slideDownFadeButtons 0.3s ease-out;
}

@keyframes slideDownFadeButtons {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    min-width: 60px;
}

.action-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.action-button:active {
    transform: translateY(0);
}

.action-button.timer-active {
    position: relative;
}
.action-button.timer-active::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 2px var(--bg-overlay);
}

.action-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.action-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    opacity: 0.9;
}


/* Station Info Popup */
.station-info-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.station-info-popup-content {
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    min-width: 360px;
    max-width: 90vw;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.station-info-popup-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.station-info-popup-link {
    display: block;
    width: 100%;
    padding: 12px 24px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    background: transparent;
    min-height: 44px;
    overflow: visible;
    text-overflow: clip;
}

.station-info-popup-link:hover {
    background: rgba(255, 255, 0, 0.1);
    color: var(--primary-color);
    text-decoration: underline;
}

.station-info-popup-link:active {
    opacity: 0.8;
}

.station-info-popup-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
    margin: 0;
}

.station-info-popup-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.station-info-popup-close:active {
    transform: scale(0.95);
}

/* Station Menu - meniu vechi (păstrat pentru butoanele Distribuie și Info) */
.station-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideDownFade 0.2s ease-out;
}

@keyframes fadeInFullscreen {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Ajustare pentru poziționare fixă */
.station-menu[style*="position: fixed"] {
    animation: slideDownFadeFixed 0.2s ease-out;
}

@keyframes slideDownFadeFixed {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.station-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    margin-bottom: 12px;
}

.station-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.station-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.station-menu-item:active {
    transform: scale(0.98);
}

.station-menu-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1001;
}

.station-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

/* Contact Form Popup */
.contact-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInFullscreen 0.2s ease-out;
    will-change: opacity;
    transform: translateZ(0);
}

.contact-popup.show {
    display: flex;
}

.contact-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.contact-popup-content {
    position: relative;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.3s ease-out;
    z-index: 1;
}

.contact-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    left: auto;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.contact-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.contact-popup-close:active {
    transform: scale(0.95);
}

.contact-popup-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 8px 0;
    text-align: center;
    line-height: 1.3;
}

.contact-popup-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 32px 0;
    text-align: center;
    line-height: 1.5;
}

/* ========== Timer Popup (oprire programată) ========== */
.timer-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInFullscreen 0.2s ease-out;
}

.timer-popup.show {
    display: flex;
}

.timer-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.timer-popup-content {
    position: relative;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.3s ease-out;
    z-index: 1;
}

.timer-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.timer-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.timer-popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 6px 0;
    text-align: center;
}

.timer-popup-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.4;
}

.timer-display-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.timer-display {
    font-variant-numeric: tabular-nums;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.05em;
}

.timer-popup-content.timer-running .timer-display {
    color: rgba(255, 255, 255, 0.95);
}

.timer-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
}

.timer-preset {
    min-width: 64px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-preset:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.timer-preset:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.timer-preset.timer-preset-active {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
}

.timer-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.timer-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.timer-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-color);
}

.timer-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.timer-btn-start {
    background: var(--primary-color);
    color: #fff;
}

.timer-btn-start:hover {
    filter: brightness(1.08);
}

.timer-btn-start.timer-btn-stop {
    background: #b91c1c;
    color: #fff;
}

.timer-btn-start.timer-btn-stop:hover {
    filter: brightness(1.1);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.contact-form-input::placeholder,
.contact-form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.contact-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.contact-form-button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.contact-form-button-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.contact-form-button-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.contact-form-button-cancel:active {
    transform: translateY(0);
}

.contact-form-button-submit {
    background: var(--primary-color);
    color: #1e1e1e;
    border: 1px solid var(--primary-color);
    font-weight: 600;
}

.contact-form-button-submit:hover {
    background: #45b8b0;
    border-color: #45b8b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.contact-form-button-submit:active {
    transform: translateY(0);
}

.contact-form-button-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-form-button-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Mobile adjustments for contact form */
@media (max-width: 768px) {
    .contact-popup-content {
        padding: 24px 20px;
        max-width: 100%;
        border-radius: 16px;
    }
    
    .contact-popup-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .contact-popup-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .contact-form {
        gap: 20px;
    }
    
    .contact-form-actions {
        flex-direction: column;
    }
    
    .contact-form-button {
        width: 100%;
        justify-content: center;
    }
}

/* Language Popup (fullscreen) */
.language-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 90px 20px 40px 20px;
    box-sizing: border-box;
    overflow-y: auto;
    animation: fadeInFullscreen 0.2s ease-out;
    will-change: opacity;
    transform: translateZ(0);
}

.language-popup.show {
    display: flex;
}

/* Language Popup - butonul de închidere - centrat deasupra titlului */
.language-popup-close {
    position: absolute !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.language-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-popup-close:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.language-popup-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.station-menu-item .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.station-menu-item span {
    flex: 1;
}

.station-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 24px 0;
    width: 100%;
    max-width: 600px;
}

.station-menu-language-section {
    padding: 8px 0 0 0;
}

/* Language Popup - secțiunea de limbi în popup */
.language-popup .language-popup-content {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 0 auto;
}

.language-popup .language-popup-title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-align: center;
    margin: 0;
    flex-shrink: 0;
}

/* OPTIMIZARE: Câmp de căutare pentru limbi */
.language-popup-search {
    width: 100%;
    max-width: 600px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    margin: 0;
    transition: all 0.2s ease;
    box-sizing: border-box;
    display: block;
    flex-shrink: 0;
}

.language-popup-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.language-popup-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.language-popup .language-popup-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    flex: 1 1 auto;
    min-height: 0;
}

.station-menu-language-title {
    padding: 0 0 20px 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.station-menu-language-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    padding: 0;
}

.station-menu-language-option {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-align: center;
}

.station-menu-language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.station-menu-language-option.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-weight: 600;
}

/* Language Popup - butoanele de limbi în popup - stil simplu fără culori */
.language-popup .language-popup-option {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    /* Dimensiuni fixe pentru toate casetele */
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateZ(0);
    will-change: background;
}

.language-popup .language-popup-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-popup .language-popup-option.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* OPTIMIZARE: Focus visible pentru accesibilitate */
.language-popup .language-popup-option:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.language-popup .language-popup-option:focus:not(:focus-visible) {
    outline: none;
}

/* OPTIMIZARE: Responsive pentru mobile */
@media (max-width: 768px) {
    .language-popup {
        padding: 90px 16px 30px 16px;
    }
    
    .language-popup .language-popup-content {
        gap: 20px;
        max-width: 100%;
    }
    
    .language-popup .language-popup-title {
        font-size: 1.3rem;
        margin: 55px 0 0 0;
    }
    
    .language-popup .language-popup-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        max-width: 100%;
    }
    
    .language-popup .language-popup-option {
        padding: 14px 16px;
        font-size: 0.9rem;
        min-height: 52px;
        height: 52px;
    }
    
    .language-popup-search {
        max-width: 100%;
        padding: 14px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .language-popup-close {
        top: 16px !important;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* Playback line (LIVE indicator) */
.playback-line {
    width: 100% !important; /* aceeași lățime ca containerul panoului */
    height: 3px !important; /* mai groasă */
    border-radius: 999px;
    overflow: visible !important;
    background: rgba(255,255,255,0.3) !important; /* subtil, fără luminozitate în exterior */
    margin-top: 3px !important; /* mai aproape de text */
    margin-bottom: 10px !important; /* mai departe de butoane */
    margin-left: 0 !important;
    margin-right: 0 !important;
    opacity: 1 !important;
    pointer-events: none;
    display: block !important;
    flex-shrink: 0 !important;
    min-height: 3px !important; /* mai groasă */
    visibility: visible !important;
    position: relative !important;
    z-index: 100 !important;
    /* Fără box-shadow pentru a nu lumina în exterior */
    transform: translateZ(0) !important;
}

.playback-line-inner {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    /* Default (idle): calm, monochrome */
    background: rgba(255,255,255,0.14);
}

/* Idle: very subtle */
.playback-line[data-state="idle"] {
    opacity: 0.6; /* mărit pentru a fi mai vizibil */
}

/* Loading: efect mai puternic și mai vizibil */
.playback-line[data-state="loading"] {
    opacity: 1 !important; /* mai vizibil */
}
.playback-line[data-state="loading"] .playback-line-inner {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.1),
        rgba(255,255,255,0.9), /* mai puternic */
        rgba(255,255,255,0.1)
    );
    background-size: 150% 100%; /* mai rapid */
    background-position: 0% 50%;
    animation: playback-shimmer 0.6s linear infinite; /* mai rapid */
}

/* Playing: remove colors, slow calm shimmer */
.playback-line[data-state="playing"] {
    opacity: 0.65;
}
.playback-line[data-state="playing"] .playback-line-inner {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.06),
        rgba(255,255,255,0.22),
        rgba(255,255,255,0.06)
    );
    background-size: 220% 100%;
    background-position: 0% 50%;
    animation: playback-shimmer 2.2s ease-in-out infinite;
}

/* Error: red, visible */
.playback-line[data-state="error"] {
    opacity: 0.95;
    background: rgba(255, 107, 107, 0.18);
}
.playback-line[data-state="error"] .playback-line-inner {
    background: linear-gradient(90deg,
        rgba(255, 107, 107, 0.0),
        rgba(255, 107, 107, 0.95),
        rgba(255, 107, 107, 0.0)
    );
    background-size: 200% 100%;
    background-position: 0% 50%;
    animation: playback-shimmer 0.9s linear infinite;
}

/* Ad: Spotify-like progress fill */
.playback-line[data-state="ad"] {
    opacity: 0.98;
    background: rgba(29, 185, 84, 0.18); /* Spotify green */
}
.playback-line[data-state="ad"] .playback-line-inner {
    width: 0%;
    background: rgba(29, 185, 84, 0.92);
    animation: none !important;
    transition: width 0.16s linear;
}
.playback-line[data-state="ad"][data-paused="true"] .playback-line-inner {
    opacity: 0.7;
    transition: none;
}

@keyframes playback-shimmer {
    0% { background-position: -50% 50%; }
    100% { background-position: 150% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .playback-line[data-state="playing"] .playback-line-inner,
    .playback-line[data-state="loading"] .playback-line-inner,
    .playback-line[data-state="error"] .playback-line-inner {
        animation: none;
        transform: translateX(0);
        width: 100%;
    }
}

/* Buttons */
button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    /* OPTIMIZARE: will-change pentru performanță */
    will-change: transform;
}

/* Player buttons disabled (used during ads) */
.player-controls-buttons button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* Cosmos toggle button (active state) - fără luminozitate verde */
#cosmos-button.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Panel buttons active state */
#search-button.active,
#favorites-button.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

button:active {
    transform: scale(0.95);
}

/* OPTIMIZARE: Focus states pentru accesibilitate - fără luminozitate verde */
button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

.play-button {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    color: #111111;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    /* Centrat în mijlocul containerului */
    flex-shrink: 0;
    align-self: center;
}

.aux-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    overflow: visible;
    /* Centrat în mijlocul containerului */
    flex-shrink: 0;
    align-self: center;
}

.aux-button:hover {
    background: rgba(255,255,255,0.2);
}

/* Volume Control - butonul se alungește vertical când e deschis (Opțiunea 2: doar butonul, nu containerul) */
.volume-control {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Alinează butonul la baza containerului */
    /* Asigură că nu afectează layout-ul containerului */
    align-self: center;
    /* Previne layout shift - butonul se extinde în sus, nu afectează containerul */
    overflow: visible; /* PERMITE extinderea în afara containerului */
    /* FORȚEAZĂ înălțime fixă - nu mărește containerul */
    height: 40px; /* Înălțime fixă egală cu aux-button (next/prev) */
    min-height: 40px;
    max-height: 40px; /* FORȚEAZĂ - nu se mărește */
    /* Butonul se extinde în sus fără să afecteze containerul */
    flex-shrink: 0;
    /* Asigură că containerul nu se mărește */
    box-sizing: border-box;
    /* Previne comportament ciudat */
    will-change: auto;
    /* Z-index pentru a permite extinderea peste alte elemente */
    z-index: 110; /* Peste linia de redare (100) */
    /* FORȚEAZĂ lățime fixă pentru a preveni micșorarea containerului */
    width: 40px;
    min-width: 40px;
}

/* Butonul de volum - circular când e închis, alungit când e deschis - ACEEAȘI DIMENSIUNE CA NEXT/PREV */
.volume-button {
    background-color: rgba(51, 51, 51, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: calc(40px + clamp(80px, 8vh, 110px) + 22px);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    /* Animație smooth pentru extindere - FĂRĂ tranziție pentru transform/position pentru stabilitate */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.15s ease; /* Tranziție rapidă pentru opacity la click */
    /* NU includem transform în tranziție - previne vibrații și pulsație */
    /* Previne layout shift - butonul se extinde în sus, nu afectează containerul */
    transform-origin: bottom center;
    /* Asigură că extinderea nu mărește containerul */
    margin-bottom: 0;
    /* Previne comportament ciudat */
    will-change: height;
    /* FORȚEAZĂ lățime fixă pentru a preveni micșorarea */
    flex-shrink: 0;
}

/* Când slider-ul este deschis, butonul se alungește vertical (doar butonul, nu containerul) */
/* FOLOSIM DOAR .active - hover este gestionat de JavaScript pentru a evita conflicte */
.volume-control.active .volume-button {
    height: calc(40px + clamp(80px, 8vh, 110px) + 22px) !important;
    min-height: 40px !important;
    max-height: calc(40px + clamp(80px, 8vh, 110px) + 22px) !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border-radius: 20px !important;
    padding: clamp(6px, 0.5vw, 8px) 0 clamp(12px, 0.875vw, 14px) 0 !important;
    justify-content: space-between !important;
    align-items: center !important;
    /* BUTONUL RĂMÂNE ANCORAT LA BAZA CONTAINERULUI - se extinde în sus ÎN AFARA containerului */
    position: absolute !important; /* ABSOLUTE pentru a ieși din flow și a se extinde în afara containerului */
    bottom: 0 !important; /* Ancorat la baza .volume-control */
    /* CENTRARE STABILĂ - fără transform pentru a evita vibrații */
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Asigură că extinderea iese în afara containerului */
    z-index: 110 !important; /* Peste linia de redare (100) și alte elemente */
    /* Butonul se extinde în sus, peste marginea superioară a containerului */
    /* FĂRĂ tranziție pentru position/transform - previne vibrații */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* PLACEHOLDER INVISIBIL - menține dimensiunea containerului când butonul devine absolute */
.volume-control.active::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    visibility: hidden; /* Invisibil dar ocupă spațiu */
    pointer-events: none;
}

/* Iconița centrată când butonul este închis, jos când este deschis */
.volume-button svg {
    width: clamp(14px, 1.25vw, 20px);
    height: clamp(14px, 1.25vw, 20px);
    flex-shrink: 0;
    order: 2;
    display: block;
    transform: translateY(0);
    align-self: center;
    margin: 0 auto;
}

.volume-button:hover {
    background-color: rgba(70, 70, 70, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    /* FĂRĂ transform la hover - previne pulsația */
    transform: none !important;
}

/* Eliminat efecte de pulsație la click - SUPRA-SCRIE stilurile globale button:active */
.volume-button:active,
.volume-button:focus,
.volume-button:focus-visible {
    /* FĂRĂ transform - previne pulsația (supra-scrie button:active { transform: scale(0.95) }) */
    transform: none !important;
    /* FĂRĂ schimbări de dimensiuni - previne pulsația DOAR dacă NU e active */
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    /* FĂRĂ outline sau box-shadow care pot cauza pulsație */
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    /* Doar feedback vizual subtil fără pulsație */
    opacity: 0.85;
}

/* Când volume-control e active, NU suprascrie înălțimea */
.volume-control.active .volume-button:active,
.volume-control.active .volume-button:focus,
.volume-control.active .volume-button:focus-visible {
    height: calc(40px + clamp(80px, 8vh, 110px) + 22px) !important;
    min-height: 40px !important;
    max-height: calc(40px + clamp(80px, 8vh, 110px) + 22px) !important;
}

/* Touch devices */
/* Eliminat efecte de pulsație la click pentru touch devices */
.volume-control.touch-device .volume-button:active {
    /* FĂRĂ transform - previne pulsația */
    transform: none !important;
    /* FĂRĂ schimbări de dimensiuni - previne pulsația DOAR dacă NU e active */
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    /* Doar feedback vizual subtil fără pulsație */
    background: linear-gradient(135deg, rgba(90, 90, 90, 0.95) 0%, rgba(80, 80, 80, 0.95) 100%);
    opacity: 0.85;
}

/* Când volume-control e active pe touch, NU suprascrie înălțimea */
.volume-control.touch-device.active .volume-button:active {
    height: calc(40px + clamp(80px, 8vh, 110px) + 24px) !important;
    min-height: 40px !important;
    max-height: calc(40px + clamp(80px, 8vh, 110px) + 24px) !important;
}

.volume-control.touch-device.active .volume-button {
    height: calc(40px + clamp(80px, 8vh, 110px) + 24px);
    min-height: 40px;
    max-height: calc(40px + clamp(80px, 8vh, 110px) + 24px);
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border-radius: 20px;
    padding: clamp(6px, 0.5vw, 8px) 0 clamp(14px, 1vw, 16px) 0;
    justify-content: space-between;
    align-items: center;
}

.volume-control.touch-device .volume-button svg {
    transform: translateY(0);
    align-self: center;
    margin: 0 auto;
}

/* Slider container - în interiorul butonului */
.volume-slider-container {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    padding: 0;
    border: none;
    margin: 0 0 clamp(2px, 0.25vw, 4px) 0;
    width: 100%;
    flex: 1 1 auto;
    order: 1;
    position: relative;
    min-width: clamp(32px, 3.5vw, 44px);
    z-index: 2; /* deasupra iconiței în același buton */
    max-height: calc(100vh - clamp(12px, 1.5vh, 20px) - clamp(38px, 4.2vw, 44px) - 20px);
}

/* FOLOSIM DOAR .active - hover este gestionat de JavaScript pentru stabilitate */
.volume-control.active .volume-slider-container {
    display: flex;
    /* Animație smooth pentru apariție */
    animation: volumeSliderFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes volumeSliderFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress fill - arată nivelul volumului (se umple de jos în sus) */
.volume-progress-fill {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(4px, 0.4vw, 6px);
    height: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: clamp(2px, 0.2vw, 3px);
    pointer-events: none;
    z-index: 1;
    box-sizing: border-box;
}

/* Slider vertical */
.volume-slider-container .volume-slider {
    width: clamp(4px, 0.4vw, 6px);
    height: clamp(80px, 8vh, 110px);
    margin: 0 auto;
    cursor: pointer;
    background: rgba(51, 51, 51, 0.6);
    border-radius: clamp(2px, 0.2vw, 3px);
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none;
    writing-mode: vertical-lr;
    direction: rtl;
    display: block;
    padding: 0 clamp(12px, 1vw, 20px);
    margin: 0 clamp(-12px, -1vw, -20px);
}

/* Track pentru WebKit */
.volume-slider-container .volume-slider::-webkit-slider-runnable-track {
    width: clamp(4px, 0.4vw, 6px);
    height: clamp(80px, 8vh, 110px);
    background: rgba(51, 51, 51, 0.6) !important;
    border-radius: clamp(2px, 0.2vw, 3px);
}

/* Thumb pentru WebKit */
.volume-slider-container .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: clamp(12px, 1.15vw, 18px);
    height: clamp(12px, 1.15vw, 18px);
    background-color: rgba(255, 255, 255, 1) !important;
    border: clamp(1.5px, 0.15vw, 2px) solid rgba(51, 51, 51, 0.8) !important;
    border-radius: 50%;
    margin-left: calc((clamp(12px, 1.15vw, 18px) - clamp(4px, 0.4vw, 6px)) / -2);
    margin-top: clamp(-2px, -0.15vw, -1px);
    box-shadow: 0 clamp(1px, 0.1vw, 2px) clamp(4px, 0.4vw, 8px) rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Thumb pentru Firefox */
.volume-slider-container .volume-slider::-moz-range-thumb {
    width: clamp(12px, 1.15vw, 18px);
    height: clamp(12px, 1.15vw, 18px);
    background-color: rgba(255, 255, 255, 1) !important;
    border: clamp(1.5px, 0.15vw, 2px) solid rgba(51, 51, 51, 0.8) !important;
    border-radius: 50%;
    box-shadow: 0 clamp(1px, 0.1vw, 2px) clamp(4px, 0.4vw, 8px) rgba(0, 0, 0, 0.5);
    transform: translateY(clamp(-2px, -0.15vw, -1px));
}

/* Track pentru Firefox */
.volume-slider-container .volume-slider::-moz-range-track {
    width: clamp(4px, 0.4vw, 6px);
    height: clamp(80px, 8vh, 110px);
    background: rgba(51, 51, 51, 0.6) !important;
    border-radius: clamp(2px, 0.2vw, 3px);
}

/* Touch devices */
.volume-control.touch-device .volume-slider-container {
    padding: 0;
    margin: 0 0 clamp(2px, 0.25vw, 4px) 0;
    min-width: clamp(32px, 3.5vw, 44px);
}

/* Focus states */
/* Eliminat efecte de pulsație pentru slider la focus */
.volume-slider-container .volume-slider:focus-visible {
    /* FĂRĂ outline care poate cauza pulsație */
    outline: none !important;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Side Controls */
.aux-controls-left, .aux-controls-right {
    position: fixed;
    top: 50%;
    /* centru exact pe ecran */
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 1; /* IMPORTANT: vizibil din start pentru LCP */
}

.aux-controls-left {
    left: var(--spacing);
}

.aux-controls-right {
    right: var(--spacing);
}

/* (Deprecated) aux-controls-left nu mai e folosit; păstrăm compatibilitatea fără să ocupe spațiu */
.aux-controls-left:empty {
    display: none;
}

/* ========== Meniu site (colț dreapta-sus): Contacte, Termeni, Politica, Limbă ========== */
.top-right-menu {
    position: fixed;
    top: var(--spacing);
    right: var(--spacing);
    z-index: 15;
}
.top-right-menu .site-menu-trigger {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    background: var(--bg-overlay);
    backdrop-filter: var(--blur-amount);
    -webkit-backdrop-filter: var(--blur-amount);
    color: var(--text-color);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.top-right-menu .site-menu-trigger:hover {
    opacity: 0.95;
}
.top-right-menu .site-menu-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
.top-right-menu .site-menu-trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
}
.site-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    max-width: 280px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    overflow: hidden;
}
.site-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.site-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
    box-sizing: border-box;
    transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
    font-size: 0.95rem;
}
.site-menu-item:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}
.site-menu-item:active {
    transform: none;
}
.site-menu-link {
    font-family: inherit;
}
.site-menu-separator {
    height: 1px;
    margin: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
}

/* Stil consistent / vizibilitate bună pentru butoane laterale */
.aux-controls-right .aux-button,
.aux-controls-left .aux-button {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* SVG stroke icon style (similar cu geolocation, dar uniform pentru toate) */
.aux-icon {
    fill: none;
    stroke: currentcolor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    display: block;
}

/* Player control icons (prev/play/next/lang) */
.icon {
    width: 22px;
    height: 22px;
    display: block;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Săgeți pentru butonul de submeniu - afișare/ascundere în funcție de starea submeniului */
#lang-button .icon-arrow-up,
#lang-button .icon-arrow-down {
    transition: opacity 0.3s ease;
}

/* Când submeniul este deschis: ascunde săgeata în sus, afișează săgeata în jos */
.player-controls-container:has(.action-buttons-row.show) #lang-button .icon-arrow-up {
    display: none !important;
}

.player-controls-container:has(.action-buttons-row.show) #lang-button .icon-arrow-down {
    display: block !important;
}

/* Când submeniul este închis: afișează săgeata în sus, ascunde săgeata în jos */
#lang-button .icon-arrow-up {
    display: block;
}

#lang-button .icon-arrow-down {
    display: none;
}

/* ========== RTL: limbi araba, farsi etc. – butoanele (prev/next) și rândurile se oglindesc ========== */
[dir="rtl"] .player-controls-buttons {
    flex-direction: row-reverse;
}
[dir="rtl"] .action-buttons-row,
[dir="rtl"] .action-buttons-row.show {
    flex-direction: row-reverse;
}
/* Numărul de stații și steaua (favorite) rămân în poziția lor: stânga / dreapta (nu oglindim) */
[dir="rtl"] .station-info-container {
    direction: ltr;
}
/* Linia de redare (progress) umple tot de la stânga la dreapta și în RTL */
[dir="rtl"] .playback-line {
    direction: ltr;
}

/* Panoul lateral (meniu) se deschide din dreapta în RTL */
[dir="rtl"] .slide-panel {
    left: auto;
    right: 0;
    transform: translateX(100%);
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.12);
}
[dir="rtl"] .slide-panel.open {
    transform: translateX(0);
}
/* Butoane laterale (Search, Preferate etc.) rămân în DREAPTA – nu le mutăm în RTL */

/* Play icon: umplut (triunghi), centrat perfect */
.play-icon {
    fill: currentcolor;
    stroke: none;
    transform: translateX(1px); /* mic tweak optic */
    display: block;
}

/* Slide Panel */
.slide-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 320px;
    max-width: 95vw;
    background: rgba(18,18,18,0.80);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.45s ease-out;
    border-right: 1px solid rgba(255,255,255,0.12);
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    /* Removed will-change to prevent overshoot/jumping */
    /* Force dark native UI (select dropdowns) inside the panel */
    color-scheme: dark;
    /* mobile swipe close feels better */
    touch-action: pan-y;
    /* Subtle inner glow for depth */
    overflow: hidden;
}

.slide-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255,255,255,0.1) 20%,
        rgba(255,255,255,0.1) 80%,
        transparent
    );
    pointer-events: none;
}

/* Desktop: wider panel for better space utilization and slide from right */
@media (min-width: 768px) {
    .slide-panel {
        width: 420px;
        max-width: 35vw;
        left: auto;
        right: 0;
        transform: translateX(100%);
        border-right: none;
        border-left: 1px solid rgba(255,255,255,0.12);
        box-shadow: 
            0 0 0 1px rgba(255,255,255,0.05);
        background: rgba(18,18,18,0.80);
        transition: transform 0.45s ease-out;
    }
    
    .slide-panel.open {
        transform: translateX(0);
    }
}

@media (min-width: 1200px) {
    .slide-panel {
        width: 480px;
        max-width: 30vw;
    }
}

.slide-panel.open {
    transform: translateX(0);
}

.slide-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    /* Smooth scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.slide-panel-content::-webkit-scrollbar {
    width: 6px;
}

.slide-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.slide-panel-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.slide-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Desktop: more padding for better spacing */
@media (min-width: 768px) {
    .slide-panel-content {
        padding: 28px;
    }
}

/* Backdrop for easy close on mobile */
.panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0,0,0,0.15);
    /* Blur removed for better performance and clarity */
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

body.panel-open .panel-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Fix: Ensure backdrop is fully removed when panel closes */
body:not(.panel-open) .panel-backdrop {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 180ms ease, pointer-events 0s 180ms;
}

body.panel-open {
    overflow: hidden;
    /* IMPORTANT: nu blocăm scroll-ul în panel pe mobil */
    touch-action: auto;
}

/* Keep scrolling inside the panel smooth and prevent background overscroll */
.slide-panel-content {
    overscroll-behavior: contain;
    touch-action: pan-y;
}

/* Ensure long result lists are scrollable on mobile */
/* Scroll optimization for search results and favorites list */
.search-results,
.favorites-list {
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Panel typography */
.slide-panel-content h2 {
    margin: 0 0 14px 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.95);
}

/* Close button: visible on all devices, positioned in header */
.close-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    margin: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    z-index: 25;
}

/* Keep panel buttons calm (no “jump” scale) */
.slide-panel button.enhanced:hover {
    transform: none;
    box-shadow: none;
}

/* Search UI */
.search-container {
    position: relative;
    margin-bottom: 18px;
}

/* Desktop: more spacing */
@media (min-width: 768px) {
    .search-container {
        margin-bottom: 20px;
    }
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 12px 44px 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    outline: none;
    font-size: 15px;
}

/* Desktop: larger input */
@media (min-width: 768px) {
    .search-input {
        height: 48px;
        padding: 14px 48px 14px 18px;
        font-size: 16px;
    }
}

.search-input::placeholder {
    color: rgba(255,255,255,0.55);
}

.search-input:focus {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.075);
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.75);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.search-clear-icon {
    width: 16px;
    height: 16px;
    color: inherit;
    stroke: currentColor;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

/* Desktop: more spacing */
@media (min-width: 768px) {
    .search-filters {
        gap: 14px;
        margin-bottom: 22px;
    }
}

/* Row for Country and City side-by-side */
.filter-row {
    display: grid;
    gap: 10px;
}

.filter-row-location {
    grid-template-columns: 1fr 1fr;
}

/* Row for Genre and Clear button - same layout as location row */
.filter-row-genre {
    grid-template-columns: 1fr 1fr;
}

/* Desktop: more gap */
@media (min-width: 768px) {
    .filter-row-location {
        gap: 12px;
    }
    .filter-row-genre {
        gap: 12px;
    }
}

/* Clear button styled as filter-select */
.filter-group .btn-secondary {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.9);
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-align: left;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.filter-group .btn-secondary:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.filter-group .btn-secondary:active {
    background: rgba(255,255,255,0.08);
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.filter-group .btn-secondary:focus {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.2),
        0 0 0 3px rgba(255,255,255,0.1);
    outline: none;
}

/* Desktop: match filter-select height and font exactly */
@media (min-width: 768px) {
    .filter-group .btn-secondary {
        height: 48px;
        padding: 14px 18px;
        font-size: 15px;
        line-height: 1.5;
    }
}

.filter-group label {
    display: none;
}

.filter-select {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.9);
    padding: 12px 16px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color-scheme: dark; /* helps native dropdown look correct on desktop/mobile */
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.filter-select:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.filter-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.filter-select:focus {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.2),
        0 0 0 3px rgba(255,255,255,0.1);
    transform: translateY(-1px);
    outline: none;
}

.filter-select option {
    background-color: #101010;
    color: rgba(255,255,255,0.92);
    padding: 12px 16px;
    font-size: 15px;
}

.filter-select option:checked {
    background-color: #1a1a1a;
}

/* Hide default arrow in old IE/EdgeHTML */
.filter-select::-ms-expand {
    display: none;
}

/* Desktop: larger select */
@media (min-width: 768px) {
    .filter-select {
        height: 48px;
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .filter-select option {
        padding: 14px 18px;
        font-size: 15px;
    }
}


/* ==========================================================
   Fancy dropdown (desktop) for filter selects (rounded submenu)
   JS-enhanced: the native select stays hidden but in-sync.
   ========================================================== */
.fancy-select {
    position: relative;
}

.fancy-select .filter-select {
    display: none;
}

.fancy-select-button {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.88);
    padding: 8px 16px;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.fancy-select-button .label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.fancy-select-button .chev {
    display: none;
}

.fancy-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: min(320px, 45vh);
    overflow: auto;
    border-radius: 14px; /* no sharp corners */
    border: 1px solid rgba(255,255,255,0.10);
    background:
        radial-gradient(900px 360px at 20% 0%, rgba(255,255,255,0.08), rgba(255,255,255,0) 55%),
        rgba(12,12,12,0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0,0,0,0.55);
    padding: 6px;
    display: none;
}

.fancy-select.open .fancy-select-menu {
    display: block;
}

.fancy-select-option {
    width: 100%;
    border-radius: 12px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.90);
    background: transparent;
    border: 1px solid transparent;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    min-height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.fancy-select-option:hover {
    background: rgba(255,255,255,0.06);
}

.fancy-select-option.selected {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}

/* Desktop: larger touch targets */
@media (min-width: 768px) {
    .fancy-select-option {
        padding: 16px 18px;
        font-size: 16px;
        min-height: 52px;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* keep native selects on mobile */
    .fancy-select .filter-select {
        display: block;
    }
    .fancy-select-button,
    .fancy-select-menu {
        display: none !important;
    }
}

.btn-secondary {
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.5;
    font-family: inherit;
}

@media (min-width: 768px) {
    .btn-secondary {
        font-size: 15px;
    }
}

.btn-danger {
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 107, 0.35);
    background: transparent;
    color: rgba(255, 107, 107, 0.9);
    font-weight: 650;
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.45);
}

.search-results {
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scroll-behavior: smooth;
    /* Optimizare scroll pe desktop */
}

/* Desktop: GPU acceleration pentru scroll smooth */
@media (min-width: 768px) {
    .search-results {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: scroll-position;
    }
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 24px;
    gap: 12px;
    padding-bottom: 20px;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle gradient line */
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(255,255,255,0.03) 50%,
        transparent 100%
    );
    background-size: 100% 1px;
    background-position: bottom;
    background-repeat: no-repeat;
}

/* Position close button inside header - works on all devices */
.panel-header h2 {
    flex: 1;
    text-align: center;
    margin: 0;
}

/* Add invisible spacer on left to balance layout */
.panel-header::before {
    content: '';
    width: 28px;
    flex-shrink: 0;
}

.panel-header h2 {
    margin: 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Desktop: larger header */
@media (min-width: 768px) {
    .panel-header {
        margin-bottom: 28px;
        padding-bottom: 24px;
    }
    
    .panel-header h2 {
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: -0.015em;
    }
}

/* Removed .close-panel-inline - no longer used */

/* Toggle Switch */
.favorites-only-row {
    margin-bottom: 16px;
}

/* Fixed toggle at bottom for favorites */
.favorites-only-fixed {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    background: transparent;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorites-only-fixed .toggle-switch-label {
    background: transparent;
}

.favorites-only-fixed .favorites-actions {
    width: 100%;
    margin-top: 4px;
}

.favorites-only-fixed .favorites-actions button {
    width: 100%;
    height: 32px;
    font-size: 13px;
    padding: 6px 12px;
    opacity: 0.7;
    font-weight: 500;
}

.favorites-only-fixed .favorites-actions button:hover {
    opacity: 0.9;
}

.toggle-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.toggle-switch-label:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.toggle-label-text {
    font-weight: 650;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(0);
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    overflow: hidden;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(22px);
}

/* Favorites UI */
.favorites-empty {
    opacity: 0.7;
    padding: 40px 20px;
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
}

.favorites-list {
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    flex: 1;
    min-height: 0;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    max-height: calc(100vh - 320px);
    /* Optimizare scroll pe desktop */
    scroll-behavior: smooth;
}

/* Desktop: better height calculation - taller list + scroll optimization */
@media (min-width: 768px) {
    .favorites-list {
        max-height: calc(100vh - 340px);
        /* GPU acceleration pentru scroll smooth */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: scroll-position;
    }
}

.favorite-item {
    display: grid;
    grid-template-columns: 24px 1fr 28px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, opacity 0.2s ease;
    /* Optimizare pentru scroll smooth pe desktop */
    will-change: background;
    contain: layout style paint;
}

/* Desktop: more spacing and larger touch targets */
@media (min-width: 768px) {
    .favorite-item {
        grid-template-columns: 28px 1fr 32px;
        gap: 14px;
        padding: 14px 16px;
        /* Dezactivează transform pe hover pentru scroll smooth */
        transition: background 0.15s ease, opacity 0.2s ease;
    }
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.favorite-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: none;
}

.favorite-item.drag-over {
    transform: translateY(0);
}

.favorite-drag {
    opacity: 0.6;
    font-weight: 700;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.favorite-main {
    min-width: 0;
}

.favorite-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 1.4;
}

.favorite-sub {
    margin-top: 3px;
    font-size: 13px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Desktop: larger text */
@media (min-width: 768px) {
    .favorite-name {
        font-size: 16px;
    }
    
    .favorite-sub {
        font-size: 14px;
        margin-top: 4px;
    }
}

.favorite-remove {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* Close button styling - unified definition */
.close-panel {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 21;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    text-align: center;
}

.close-panel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.close-panel:active {
    transform: scale(0.95);
}

/* Search Results */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    margin: 0 2px;
    border-radius: 8px;
    /* Optimizare pentru scroll smooth pe desktop */
    will-change: background;
    contain: layout style paint;
}

/* Desktop: compact padding to show more results */
@media (min-width: 768px) {
    .search-result-item {
        padding: 12px 14px;
        gap: 12px;
        /* Dezactivează transform pe hover pentru scroll smooth */
        transition: background 0.15s ease;
    }
}

.search-result-item:hover {
    background: rgba(255,255,255,0.06);
}

/* Desktop: fără transform pe hover pentru scroll smooth */
@media (max-width: 767px) {
    .search-result-item:hover {
        transform: translateX(2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

.search-result-item:active {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 767px) {
    .search-result-item:active {
        transform: translateX(1px);
    }
}

.search-result-item.selected {
    background: rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-result-favorite {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.search-result-favorite-svg {
    width: 20px;
    height: 20px;
    display: block;
}

.search-result-favorite-svg .star-outline {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-result-favorite-svg .star-fill {
    fill: currentColor;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.search-result-favorite:hover {
    color: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
}

.search-result-favorite.is-favorite {
    color: rgba(255, 255, 255, 0.95);
}

.search-result-favorite.is-favorite .search-result-favorite-svg .star-fill {
    opacity: 1;
}

.search-result-favorite.is-favorite:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.15);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 650;
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-location {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop: slightly larger text but compact spacing */
@media (min-width: 768px) {
    .search-result-name {
        font-size: 15px;
        margin-bottom: 3px;
        line-height: 1.3;
    }
    
    .search-result-location {
        font-size: 13px;
        line-height: 1.2;
    }
}

.search-highlight {
    color: rgba(255,255,255,1);
    background: rgba(255,255,255,0.08);
    padding: 1px 6px;
    border-radius: 999px;
}

.no-results {
    opacity: 0.75;
    padding: 14px 12px;
}

/* Removed duplicate .favorites-actions - styles are in .favorites-only-fixed .favorites-actions */

/* ============================================
   TOAST NOTIFICATIONS - Elegant & Subtle
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 140px; /* mai sus (mai aproape de centru, departe de player) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-size: 0.9rem;
    min-width: 200px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.toast-success {
    border-left: 3px solid #4ecdc4;
}

.toast-success .toast-icon {
    color: #4ecdc4;
}

.toast-info {
    border-left: 3px solid #4a90e2;
}

.toast-info .toast-icon {
    color: #4a90e2;
}

.toast-error {
    border-left: 3px solid #ff6b6b;
}

.toast-error .toast-icon {
    color: #ff6b6b;
}

.toast-warning {
    border-left: 3px solid #ffa726;
}

.toast-warning .toast-icon {
    color: #ffa726;
}

.toast-message {
    flex: 1;
}

/* ============================================
   BUTTON ENHANCEMENTS - Ripple & Hover
   ============================================ */
button.enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button.enhanced:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

button.enhanced:active {
    transform: scale(0.95);
}

button.enhanced .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Play button special effects */
.play-button.enhanced {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-button.enhanced:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Aux buttons hover */
.aux-button.enhanced:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
/* OPTIMIZARE LCP: Tranzițiile sunt aplicate doar când elementul este interactiv, nu la încărcare */
.station-info-text:not(:first-child) {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.slide-panel {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .player-controls-container {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
    }
    
    .volume-slider {
        display: none; /* Hide volume slider on mobile to save space */
    }
    
    /* Ajustare pentru alinierea stelutei pe mobil */
    .station-info-container {
        column-gap: 8px; /* Redus de la 12px pentru aliniere mai bună */
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    .station-favorite-icon {
        margin-right: 0; /* Asigură că nu iese mai departe */
        margin-left: 0;
        padding: 6px; /* Păstrăm padding-ul pentru zona de click */
        width: 36px;
        min-width: 36px;
        max-width: 36px;
    }
    
    /* păstrăm centrare verticală și pe mobil */
    
    .toast-container {
        bottom: 110px;
        left: var(--spacing);
        right: var(--spacing);
        transform: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ========== App Footer (Contact, Terms, Privacy) ========== */
/* Ascuns până la app-ready ca să nu apară și să dispară textul la start */
/* Screen-reader only / hidden SEO text: invizibil vizual, detectabil de crawleri */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    padding: var(--spacing, 1rem) 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.app-ready .app-footer {
    opacity: 1;
    visibility: visible;
}
.app-footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.15s ease;
}
.app-footer-link:hover {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}
.app-footer-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}
.app-footer-sep {
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
    pointer-events: none;
}
