/* ===================================
   CSS RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Premium Dark Theme */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #13131a;
    --color-bg-card: rgba(25, 25, 35, 0.6);

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-gold: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #b8b8c8;
    --color-text-muted: #6e6e80;

    /* Accent Colors */
    --color-accent-purple: #667eea;
    --color-accent-pink: #f5576c;
    --color-accent-cyan: #00f2fe;
    --color-accent-gold: #ffd89b;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   ANIMATED BACKGROUND
   =================================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.6) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.5) 0%, transparent 70%);
    top: 50%;
    right: -10%;
    animation-delay: -7s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.4) 0%, transparent 70%);
    bottom: -10%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ===================================
   HEADER SECTION
   =================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInDown 0.8s ease;
}

.logo-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse 3s infinite ease-in-out;
}

.radio-icon {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(102, 126, 234, 0.5);
    }
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===================================
   SELECTION PROMPT
   =================================== */
.selection-prompt {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeIn 1s ease 0.3s backwards;
}

.prompt-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.prompt-underline {
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 0 auto;
    border-radius: 2px;
    animation: expandWidth 0.6s ease 0.5s backwards;
}

@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 80px;
    }
}

/* ===================================
   STATIONS GRID
   =================================== */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    width: 100%;
    max-width: 900px;
    margin-bottom: var(--spacing-2xl);
}

/* ===================================
   STATION CARD
   =================================== */
.station-card {
    position: relative;
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.8s ease backwards;
    overflow: hidden;
}

.station-card:nth-child(1) {
    animation-delay: 0.4s;
}

.station-card:nth-child(2) {
    animation-delay: 0.6s;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.station-card[data-station="california"]::before {
    background: var(--gradient-primary);
}

.station-card[data-station="clube"]::before {
    background: var(--gradient-secondary);
}

.station-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.station-card:hover::before {
    opacity: 1;
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.station-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

/* ===================================
   LOGO CONTAINER
   =================================== */
.logo-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
}

.station-card:hover .logo-container {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

.station-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: filter var(--transition-normal);
}

.station-card:hover .station-logo {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

/* ===================================
   STATION INFO
   =================================== */
.station-info {
    text-align: center;
    width: 100%;
}

.station-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.station-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-family: var(--font-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulseDot 2s infinite ease-in-out;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ===================================
   AUDIO PLAYER
   =================================== */
.audio-player {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.audio-player:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.play-button {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.station-card[data-station="clube"] .play-button {
    background: var(--gradient-secondary);
    box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.play-button:hover::before {
    width: 100%;
    height: 100%;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}

.station-card[data-station="clube"] .play-button:hover {
    box-shadow: 0 6px 24px rgba(245, 87, 108, 0.6);
}

.play-button:active {
    transform: scale(0.95);
}

.play-icon,
.pause-icon {
    width: 28px;
    height: 28px;
    color: white;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast);
}

.play-button.playing .play-icon {
    display: none;
}

.play-button.playing .pause-icon {
    display: block !important;
}

.play-button.loading {
    pointer-events: none;
}

.play-button.loading::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: white;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.player-status {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-family: var(--font-secondary);
    font-weight: 500;
}

.audio-player.playing .player-status::before {
    content: '🎵 ';
    animation: musicNote 2s infinite ease-in-out;
}

@keyframes musicNote {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    animation: fadeIn 1s ease 0.8s backwards;
}

.footer-text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-family: var(--font-secondary);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .stations-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .header {
        margin-bottom: var(--spacing-xl);
    }

    .selection-prompt {
        margin-bottom: var(--spacing-lg);
    }

    .logo-badge {
        width: 64px;
        height: 64px;
    }

    .radio-icon {
        width: 32px;
        height: 32px;
    }

    .station-card {
        padding: var(--spacing-lg);
    }

    .logo-container {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-md);
    }

    .station-card {
        padding: var(--spacing-md);
    }

    .access-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.access-button:focus-visible {
    outline: 3px solid var(--color-accent-cyan);
    outline-offset: 4px;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .background-animation {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}