/* extracted from index.php */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
background: linear-gradient(37deg, #3a3636, #4c4c90);
 font-family: "Arimo", sans-serif;

}

header {
    position: relative;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 30px 20px;
    text-align: center;

}

/* header icon group positioned on the left side */
.header-icons {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    padding: 8px;
    transition: background 0.2s;
}
.header-icon:hover {
    background: rgba(255, 255, 255, 0.28);
}
.header-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
}



header h1 {
    font-size: 2.4rem;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.6);
}

header p {
    color: #aaa;
    margin-top: 8px;
    font-size: 1rem;
}

.player-bar {
    /* float at bottom of viewport */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(
  90deg,
  #5a9b68,
  #4bb1b4,
  #2c94da,
  #0677d9,
  #3e6abd,
  #75409b,
  #dd2748
);
    border-top: 1px solid #e94560;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.5);
}

.player-bar img#now-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e94560;
}

.player-info {
    flex: 1;
}

.player-info #now-playing {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.player-info #now-status {
    font-size: 0.8rem;
    color: #131313;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#play-pause-btn {
    background: #e94560;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#play-pause-btn:hover {
    background: #c73652;
    transform: scale(1.05);
}

#stop-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stop-btn:hover {
    border-color: #e94560;
    color: #e94560;
}

#volume-slider {
    width: 90px;
    accent-color: #e94560;
    cursor: pointer;
}

audio {
    display: none;
}

.favorites-section {
    display: none;
}

.container {
    max-width: 1300px;
    margin: 10px auto;
    padding: 0 20px;
    /* leave space for the fixed player bar */
    padding-bottom: 100px;
}

.rss-frame {
    width: 100%;
    height: 40px;
    border: none;
    display: block;
    margin-bottom: 16px;
}

.search-bar {
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #1a1a2e;
    color: #fff;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #e94560;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ad-banner {
    grid-column: 1 / -1;
    border-radius: 12px;
    padding: 5px;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    color: #888;
    font-size: 0.85rem;
}

.card {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2a3e;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative; /* needed for absolute icons */
}

/* modal styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    backdrop-filter: blur(5px) grayscale(0.3);
}
.modal-content {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    color: #e0e0e0;
    text-align: center;
}
.modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: space-around;
}
.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #e94560;
    color: white;
    transition: background 0.2s;
}
.modal-buttons button:hover {
    background: #c73652;
}

.card:hover {
    transform: translateY(-4px);
    border-color: #e94560;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.25);
}

.card.active {
    border-color: #e94560;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

.card-logo {
    /* force a consistent 100x100px box for station logos */
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: #0f0f1a;
    display: block;
    border-radius: 12px; /* rounded corners */
}

.card-logo-fallback {
    /* match the size of the actual logo container */
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #e94560;
    border-radius: 12px; /* rounded corners for fallback too */
}

.card-body {
    padding: 12px;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.2s;
}

/* reveal full description on card hover */
.card:hover .card-desc {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    overflow: visible;
    color: #ccc;
}

.favorites-section {

    padding: 20px;
    margin: 20px auto;
    max-width: 1300px;
    border-radius: 12px;

}

.favorites-section h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 12px;
}

.favorites-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 5px 0 5px 0;

}

.favorites-grid .card {
    flex: 0 0 auto;
    width: 100px; /* adjust as needed */
}

.favorites-grid .card-logo,
.favorites-grid .card-logo-fallback {
    width: 60px;
    height: 60px;
}

.favorites-grid .card-name {
    font-size: 10px;
}

.favorite-symbol {
    position: absolute;
    top: 8px;
    left: 8px;
    cursor: pointer;
    opacity: 0.5;
    color: #aaa;
    transition: opacity 0.2s, transform 0.2s, color 0.2s;
    line-height: 0;
}

.favorite-symbol svg {
    transition: fill 0.2s, stroke 0.2s;
}

.favorite-symbol:hover {
    opacity: 1;
    transform: scale(1.1);
}

.favorite-symbol.favorited {
    opacity: 1;
    color: #e94560;
}

.favorite-symbol.favorited svg {
    fill: #e94560;
    stroke: #e94560;
}

/* tap-to-play overlay (shown when autoplay is blocked) */
#tap-to-play-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
#tap-to-play-btn {
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 18px 36px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
}
#tap-to-play-btn:hover {
    background: #c73652;
}

footer {
    text-align: center;
    padding: 30px;
    color: #555;
    font-size: 0.85rem;
    border-top: 1px solid #1a1a2e;
    margin-top: 40px;
}

@media (max-width: 900px) {
    /* tablet adjustments */
    header h1 { font-size: 1.8rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .card-logo, .card-logo-fallback { width: 80px; height: 80px; }
}

@media (max-width: 600px) {
    /* mobile adjustments */
    header h1 { font-size: 1.6rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
    .card-logo, .card-logo-fallback { width: 60px; height: 60px; }
    #volume-slider { display: none; }
    .header-icons { display: none; }
    .rss-frame { display: none; }
    .favorite-symbol { display: none; }
    .ad-banner { display: none; }
}

.ad-mobile { display: none; }
@media (max-width: 600px) {
    .ad-mobile { display: block; }
}

/* sticky side ad banners */
.sticky-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 600px;
    z-index: 100;
    overflow: hidden;
}
.sticky-ad-left  { left: 0; margin-left: 5px; }
.sticky-ad-right { right: 0; margin-right: 5px; }

@media (max-width: 1400px) {
    .sticky-ad { display: none; }
}
