:root {
    --primary-color: #ffffff;
    --secondary-color: rgba(255, 255, 255, 0.7);
    --accent-color: #ff3366;
    --accent-hover: #ff0040;
    --bg-glass: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);
    --shadow-glass: rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f2027; /* fallback */
    color: var(--primary-color);
    overflow: hidden;
}

/* Dynamic Gradient Background */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #0f2027, #203a43, #2c5364, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    z-index: -1;
    filter: blur(80px);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Player Glassmorphism Container */
.player-container {
    width: 380px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 var(--shadow-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transition: transform 0.3s ease;
}

.player-container:hover {
    transform: translateY(-5px);
}

.player-header {
    text-align: center;
    margin-bottom: 20px;
}

.player-header p {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.player-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Visualizer Animation */
.visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 40px;
    gap: 6px;
    margin-bottom: 25px;
}

.visualizer .bar {
    width: 6px;
    background: var(--accent-color);
    border-radius: 3px;
    height: 5px;
    transition: height 0.1s ease;
}

.visualizer.active .bar {
    animation: bounce 1s infinite ease-in-out;
}

.visualizer.active .bar:nth-child(1) { animation-delay: 0.1s; }
.visualizer.active .bar:nth-child(2) { animation-delay: 0.3s; }
.visualizer.active .bar:nth-child(3) { animation-delay: 0s; }
.visualizer.active .bar:nth-child(4) { animation-delay: 0.2s; }
.visualizer.active .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 100% { height: 5px; }
    50% { height: 35px; }
}

.station-info {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.station-logo-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff; /* White background to match logo */
    border: 3px solid var(--border-glass);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.station-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.station-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-info p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.listener-count {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.listener-count i {
    color: var(--accent-color);
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

.control-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.4);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.6);
}

.play-btn:active {
    transform: scale(0.95);
}

/* Volume Slider */
.volume-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.volume-container i {
    font-size: 0.9rem;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Station List */
.station-list-container {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
}

.station-list-container::-webkit-scrollbar {
    width: 5px;
}

.station-list-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
}

.station-list-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

.station-list-container h3 {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#station-list {
    list-style: none;
}

#station-list li {
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

#station-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

#station-list li.active {
    background: rgba(255, 51, 102, 0.2);
    border-left: 3px solid var(--accent-color);
}

.list-station-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.list-station-genre {
    font-size: 0.75rem;
    color: var(--secondary-color);
}
