* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f0a1e;
    --card: #1b1330;
    --text: #f3eefb;
    --muted: #9b8fc2;
    --border: #2a1f47;
    --shadow: rgba(0,0,0,0.35);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 200px;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ===== ШАПКА ===== */
.topbar {
    background: linear-gradient(90deg, #6c2bd9, #ff2d78);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 60px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}
.logo-img {
    display: block;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.install-btn {
    background: #fff;
    color: #6c2bd9;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 12px 12px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
h1 {
    font-size: 20px;
    margin-bottom: 4px;
}
.subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}

/* ===== СЕТКА СТАНЦИЙ ===== */
.stations {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 480px) {
    .stations { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .stations { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .stations { grid-template-columns: repeat(5, 1fr); }
}

.station {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.station:hover,
.station:focus {
    transform: translateY(-2px);
    border-color: #6c2bd9;
    outline: none;
}
.station.active {
    background: linear-gradient(135deg, #6c2bd9, #ff2d78);
    border-color: transparent;
}
.logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
}
.logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.station .name {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
}
.station .freq {
    font-size: 10px;
    color: var(--muted);
}
.station.active .freq {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== РЕКЛАМА ===== */
.ad-slot {
    margin: 12px auto;
    text-align: center;
    max-width: 100%;
    padding: 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}
.ad-placeholder {
    background: var(--card);
    border: 1px dashed #3a2c5e;
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    min-height: 50px;
    width: 100%;
    max-width: 468px;
    overflow: hidden;
}
.ad-slot > * {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
}
.ad-slot iframe,
.ad-slot img,
.ad-slot div,
.ad-slot ins,
.ad-slot a {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
    overflow: hidden !important;
}
.ad-slot div[id^="bancode_"],
.ad-slot div[id^="yandex_"],
.ad-slot div[id^="adfox_"],
.ad-slot div[class*="banner"],
.ad-slot div[class*="ad"] {
    max-width: 100% !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    text-align: center !important;
}
.ad-slot iframe {
    border: none !important;
    max-width: 100% !important;
}

/* ===== ПЛЕЕР ===== */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #160e2b;
    border-top: 2px solid #6c2bd9;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.now-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    padding: 3px;
    flex-shrink: 0;
}
.meta {
    min-width: 0;
}
.now-station {
    font-weight: 400;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.now-status {
    font-size: 10px;
    color: var(--muted);
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6c2bd9, #ff2d78);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn:active {
    transform: scale(0.92);
}
.ctrl-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #3a2c5e;
    background: transparent;
    color: #cbd5e1;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ctrl-btn:hover {
    background: #2a1f47;
    border-color: #6c2bd9;
}
.ctrl-btn:active {
    transform: scale(0.92);
}
#volume {
    width: 100px;
    accent-color: #6c2bd9;
}
@media (max-width: 400px) {
    .ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    #volume { width: 80px; }
}
.player.playing .play-btn {
    box-shadow: 0 0 20px rgba(255, 45, 120, 0.5);
}
.player.playing .now-status {
    color: #4ade80;
}

/* ===== ПОДВАЛ ===== */
.about {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 0 12px;
}

/* ===== ОТЗЫВЫ ===== */
.reviews-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 600px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 900px) {
    .reviews-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.review-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}
.review-card:hover {
    border-color: #6c2bd9;
    transform: translateY(-2px);
}
.review-card-name {
    font-weight: 700;
    font-size: 14px;
    color: #b8a8d8;
    margin-bottom: 6px;
}
.review-card-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
}
.review-card-date {
    font-size: 10px;
    color: var(--muted);
    margin-top: 10px;
    text-align: right;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

/* ===== РЕКЛАМА В СЕТКЕ ===== */
.ad-grid {
    grid-column: 1 / -1 !important;
    margin: 8px 0 !important;
    padding: 0 !important;
}
.ad-grid .ad-placeholder {
    max-width: 100% !important;
    min-height: 60px !important;
    background: var(--card);
    border: 1px dashed #3a2c5e;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* ===== МОБИЛЬНЫЙ ПЛЕЕР ===== */

/* ★ УДЛИНЯЕМ ПОЛЗУНОК ГРОМКОСТИ НА МОБИЛЬНЫХ ★ */
@media (max-width: 600px) {
    #volume {
        width: 120px !important;  /* вместо 40-60px */
        min-width: 80px;
    }
    .player-controls {
        gap: 10px;
    }
}

/* ★ СКРЫВАЕМ НАДПИСЬ "Выберите станцию" НА МОБИЛЬНЫХ ★ */
@media (max-width: 480px) {
    .now-station {
        font-size: 11px;
        max-width: 100px;
    }
    /* Если нужно скрыть полностью — раскомментируй */
    /* .now-station { display: none; } */
    
    /* ★ Оставляем только статус (буферизация/в эфире) ★ */
    .now-status {
        font-size: 10px;
        font-weight: 500;
    }
    
    /* ★ Логотип станции в плеере ★ */
    .now-logo {
        width: 32px;
        height: 32px;
    }
    
    /* ★ Кнопки управления ★ */
    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}