:root {
    --primary: #0073aa;
    --dark: #111;
    --light: #f4f4f4;
    --text: #333;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--text);
    margin: 0;
    padding-bottom: 80px; /* Spatiu pentru player */
}

#main-content {
    width: 100%;
    max-width: 1200px; /* Lățimea maximă a site-ului */
    margin: 0 auto;    /* Centrează tot conținutul */
    padding: 20px;
    box-sizing: border-box;
}

.rd-navbar {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
}

.rd-navbar__container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.rd-navbar__logo { font-weight: 700; font-size: 22px; color: var(--primary); text-decoration: none; }

.rd-page-header { background: #fff; padding: 40px 20px; text-align: center; border-bottom: 1px solid #eee; }

.rd-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.rd-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.rd-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.rd-card__logo { width: 100px; height: 100px; object-fit: contain; margin-bottom: 15px; }

.rd-card__title { font-size: 16px; margin: 0; font-weight: 600; }

/* Player Bar */
#persistent-player {
    position: fixed; bottom: 0; width: 100%; background: var(--dark);
    color: #fff; padding: 15px 20px; z-index: 1000; display: none;
}

/* Stiluri Dropdown */
.rd-navbar__menu {
    list-style: none; display: flex; gap: 25px; margin: 0; padding: 0;
}

.rd-navbar__item { position: relative; }

.rd-navbar__link {
    text-decoration: none; color: var(--text); font-weight: 500;
    padding: 10px 0; display: block; cursor: pointer;
}

.rd-navbar__submenu {
    position: absolute; top: 100%; left: 0; background: #fff;
    min-width: 200px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px; padding: 10px 0; list-style: none;
    display: none; z-index: 1000; border: 1px solid #eee;
}

.rd-navbar__item:hover .rd-navbar__submenu { display: block; }

.rd-navbar__sublink {
    display: block; padding: 10px 20px; text-decoration: none;
    color: var(--text); font-size: 14px;
}

.rd-navbar__sublink:hover { background: var(--light); color: var(--primary); }

.rd-card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* --- RESPONSIVE DESIGN --- */

/* Butonul Burger (ascuns pe desktop) */
.rd-navbar__toggle {
    display: none;
    background: none; border: none; cursor: pointer; padding: 10px;
}

.rd-navbar__toggle span {
    display: block; width: 25px; height: 3px; background: var(--text);
    margin: 5px 0; transition: 0.3s;
}

@media (max-width: 768px) {
    /* Navbar mobil */
    .rd-navbar__container { padding: 10px 15px; }
    
    .rd-navbar__toggle { display: block; order: 1; }
    .rd-navbar__logo { order: 2; flex: 1; text-align: center; }
    .rd-navbar__right { display: none !important; } /* Ascundem căutarea fixă pe mobil pentru spațiu */

    .rd-navbar__menu {
        position: fixed; top: 60px; left: -100%; width: 80%; height: 100vh;
        background: #fff; flex-direction: column; gap: 0;
        box-shadow: 10px 0 20px rgba(0,0,0,0.1); transition: 0.4s; z-index: 1000;
    }

    .rd-navbar__menu.is-active { left: 0; }

    .rd-navbar__item { border-bottom: 1px solid #eee; width: 100%; }
    .rd-navbar__link { padding: 15px 20px; width: 100%; }
    
    .rd-navbar__submenu {
        position: static; box-shadow: none; display: block; 
        background: #f9f9f9; padding-left: 20px; border: none;
    }

    /* Grid-ul de radiouri (2 coloane pe mobil) */
    .rd-radio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 15px !important;
    }

    .rd-card { padding: 15px; }
    .rd-card__logo { width: 70px; height: 70px; }
    .rd-card__title { font-size: 14px; }

    /* Playerul pe mobil */
    #persistent-player-container div {
        flex-direction: column; gap: 10px; text-align: center;
    }
    
    #player-logo { display: none !important; } /* Scoatem logoul mic pe mobil pentru spațiu */
    
    #volume-slider { display: none; } /* Utilizatorii de mobil folosesc butoanele fizice ale telefonului */
}

.rd-heart {
    background: none; border: none; cursor: pointer; padding: 5px;
    transition: transform 0.2s; color: #ccc; /* Gri când e inactiv */
}

.rd-heart:hover { transform: scale(1.2); }

.rd-heart.is-active {
    color: #e74c3c; /* Roșu când e salvat la favorite */
}

.rd-heart svg { width: 20px; height: 20px; fill: currentColor; }

/* Forțăm grid-ul paginii de radio să nu se rupă */
.radio-single-grid {
    display: flex;
    flex-wrap: wrap; /* Permite picarea pe rândul următor pe mobil */
    gap: 30px;
    width: 100%;
    align-items: flex-start;
}

.radio-main-content {
    flex: 1; /* Ocupă tot spațiul din stânga */
    min-width: 300px;
}

.radio-sidebar {
    width: 320px; /* Sidebar fix în dreapta */
    flex-shrink: 0;
}

.rd-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 100px 0; /* Spațiu jos mai mare pentru a nu fi acoperit de player */
    margin-top: 50px;
}

.rd-footer__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding: 0 20px;
}

.rd-footer__logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.rd-footer__logo span { color: var(--primary); }

.rd-footer__text {
    color: #aaa;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 20px;
}

.rd-footer__title {
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
}

.rd-footer__title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.rd-footer__links { list-style: none; padding: 0; }
.rd-footer__links li { margin-bottom: 12px; }
.rd-footer__links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.rd-footer__links a:hover { color: #fff; padding-left: 5px; }

.rd-footer__info { list-style: none; padding: 0; color: #aaa; font-size: 14px; }
.rd-footer__info li { margin-bottom: 10px; }

.rd-footer__bottom {
    border-top: 1px solid #333;
    margin-top: 50px;
    padding-top: 25px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

@media (max-width: 768px) {
    .rd-footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .rd-footer__title::after { left: 50%; transform: translateX(-50%); }
}

.nowplaying { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; gap: 2px; }
.nowplaying span { display: block; width: 3px; height: 100%; background: #2ecc71; animation: play 0.8s infinite alternate; }
.nowplaying span:nth-child(2) { animation-delay: 0.2s; }
.nowplaying span:nth-child(3) { animation-delay: 0.4s; }

@keyframes play {
    0% { height: 3px; }
    100% { height: 15px; }
}