:root {
    --primary-color: #ff9900; /* Dutch Orange */
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #ffffff;
    --secondary-text: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--primary-color);
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 25px;
    border: none;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.2s;
}

#search-input:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-text);
}

.player-status {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.current-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

#current-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #fff; /* White bg for transparent logos */
    padding: 2px;
}

#current-station {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

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

#play-pause-btn:hover:not(:disabled) {
    transform: scale(1.1);
    background-color: #e68a00;
}

#play-pause-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

#volume-slider {
    width: 150px;
    accent-color: var(--primary-color);
}

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

.station-card {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    border: 2px solid transparent;
    overflow: hidden;
}

.station-card:hover {
    transform: translateY(-5px);
    background-color: #3d3d3d;
}

.station-card.active {
    border-color: var(--primary-color);
    background-color: #3d3d3d;
}

.station-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #fff;
    padding: 2px;
}

.station-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #444;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 2rem;
    color: var(--secondary-text);
}

.station-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--secondary-text);
    padding: 40px;
}

@media (max-width: 600px) {
    .station-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    header h1 {
        font-size: 2rem;
    }
}