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

:root {
    --primary-color: #007AFF;
    --primary-hover: #0051D5;
    --background: #F5F5F7;
    --surface: #FFFFFF;
    --surface-hover: #F9F9F9;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent: #5856D6;
    --border: #E5E5E7;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --active-gradient: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: inherit;
    animation: rotateGradient 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 0 24px;
}

.logo {
    height: 60px;
    width: auto;
    max-width: 300px;
    display: inline-block;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    font-weight: 400;
}

main {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.stations-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.station-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 1px 3px var(--shadow);
    position: relative;
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.station-card:active::before {
    left: 100%;
}

.station-card:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--border);
}

.station-card.active {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    transform: translateY(1px);
}

.station-card.active:hover {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.station-logo {
    width: 100%;
    max-width: 140px;
    height: auto;
    max-height: 50px;
    margin-bottom: 12px;
    object-fit: contain;
    transition: all 0.2s ease;
}

/* Some logos are white, some are colored - let them display naturally */
.station-card[data-station="batida"] .station-logo {
    filter: brightness(0) saturate(100%) invert(0);
}

/* Keep logos the same color when active - no color change */
.station-card.active[data-station="batida"] .station-logo {
    filter: brightness(0) saturate(100%) invert(0);
}

.station-card.active[data-station="comercial"] .station-logo,
.station-card.active[data-station="cidade"] .station-logo,
.station-card.active[data-station="rfm"] .station-logo,
.station-card.active[data-station="rfmDance"] .station-logo,
.station-card.active[data-station="rfmJazzy"] .station-logo,
.station-card.active[data-station="rfmNovas"] .station-logo {
    filter: none;
}

.station-name {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
}

.station-card.active .station-name {
    color: var(--text-primary);
    font-weight: 500;
}

.player-section {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
}

.player-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.now-playing {
    display: flex;
    gap: 20px;
    align-items: center;
}

.album-art-container {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px var(--shadow);
}

.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-art-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0.4;
}

.album-art-placeholder svg {
    width: 50%;
    height: 50%;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.station-indicator {
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

.track-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.artist-name {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
}

.control-btn {
    background: var(--active-gradient);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.control-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.control-btn:active {
    transform: scale(0.98);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 300px;
}

.volume-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
    opacity: 0.7;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.15);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.15);
}

.volume-value {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    min-width: 36px;
    text-align: right;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    header {
        margin-bottom: 32px;
        padding: 24px 0 16px;
    }

    .logo {
        height: 50px;
        max-width: 250px;
    }

    main {
        gap: 32px;
    }

    .stations-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .stations-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .station-card {
        padding: 20px 16px;
    }

    .player-section {
        padding: 24px;
    }

    .player-container {
        gap: 24px;
    }

    .now-playing {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .album-art-container {
        width: 160px;
        height: 160px;
    }

    .player-controls {
        flex-direction: column;
        gap: 20px;
    }

    .volume-control {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    header {
        padding: 16px 0 12px;
    }

    .logo {
        height: 45px;
        max-width: 220px;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .stations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .station-card {
        padding: 18px 12px;
    }


    .player-section {
        padding: 20px;
    }

    .track-title {
        font-size: 1.25rem;
    }

    .artist-name {
        font-size: 1rem;
    }

    .album-art-container {
        width: 140px;
        height: 140px;
    }
}
