:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-red: #ea4335;
    --accent-hover: #fbbc04;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Dynamic glow colors - default purple */
    --glow-color-r: 88;
    --glow-color-g: 28;
    --glow-color-b: 135;
}

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

body {
    background: transparent;
    font-family: var(--font-stack);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.banner-container {
    width: 1200px;
    min-height: 300px;
    background: var(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(234, 67, 53, 0.15), transparent 400px),
        radial-gradient(circle at bottom left, rgba(251, 188, 4, 0.1), transparent 300px);
    border-radius: 16px;
    box-shadow: 
        0 0 40px 8px rgba(var(--glow-color-r), var(--glow-color-g), var(--glow-color-b), 0.3),
        0 0 60px 12px rgba(var(--glow-color-r), var(--glow-color-g), var(--glow-color-b), 0.15),
        0 24px 48px rgba(0, 0, 0, 0.5), 
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 280px 1fr 200px;
    gap: 20px;
    padding: 24px;
    overflow: hidden;
    color: var(--text-primary);
    position: relative;
    backdrop-filter: blur(20px);
    transition: box-shadow 0.8s ease-in-out;
}

/* Base Panel Styles */
aside,
main {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* Controls - Left Panel */
.controls {
    padding: 20px;
    justify-content: space-between;
}

.controls h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    user-select: none;
}

.filters-panel {
    width: 280px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 30px 30px 30px;
    /* Top padding to clear absolute logo */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dropdown-select {
    width: 100%;
    padding: 10px 12px;
    background: #30363d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 15px;
    appearance: none;
    outline: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M1 4l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.dropdown-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-select:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(234, 67, 53, 0.2);
}

.dropdown-select option {
    background: #161b22;
    color: #fff;
}

/* Roulette Main - Center Display */
.roulette-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20, 24, 30, 0.9) 0%, rgba(10, 12, 16, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.station-display {
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.station-logo-container {
    height: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.station-logo-container a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

#station-logo {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    border-radius: 4px;
    animation: fadeIn 0.5s ease;
}

#logo-fallback {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
}

.marquee-wrapper {
    overflow: hidden;
    width: 90%;
    margin: 0 auto;
    white-space: nowrap;
}

#station-name {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

#station-format {
    font-size: 16px;
    color: var(--accent-hover);
    font-weight: 500;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.town-link {
    display: inline-block;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 12px;
}

.town-link a {
    color: #a8c7fa;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.town-link a:hover {
    color: #79c0ff;
    text-decoration: underline;
}

.vista-logo-link {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 10;
}

.vista-logo {
    height: auto;
    max-width: 200px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.vista-logo-link:hover .vista-logo {
    opacity: 1;
}

/* Adjust controls layout since logo occupies top left */
.controls {
    padding: 20px;
    padding-top: 50px;
    justify-content: center;
}

.spin-btn {
    margin-top: auto;
    /* Pushed to bottom of flex container */
    padding: 14px 48px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(180deg, var(--accent-red) 0%, #b82b1c 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid #851b10;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(234, 67, 53, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
    text-transform: uppercase;
}

.spin-btn:active {
    transform: translateY(3px);
    border-bottom: 1px solid #851b10;
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.spin-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.player-controls {
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding: 20px;
    padding-top: 40px;
}

.local-info-widget {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    margin-bottom: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-display {
    font-size: 28px;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}

.timezone-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 2px;
}

.weather-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.weather-town {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cbd5e1;
}

.weather-divider {
    color: rgba(255, 255, 255, 0.2);
}

#weather-icon {
    font-size: 16px;
}

.player-action-group {
    margin-bottom: 20px;
}

.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.status-indicator.playing {
    background: #34a853;
    box-shadow: 0 0 12px rgba(52, 168, 83, 0.6);
    animation: pulse 2s infinite;
}

.status-indicator.loading {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(251, 188, 4, 0.6);
    animation: blink 1s infinite;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.icon {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(52, 168, 83, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.spinning #station-name {
    animation: blurText 0.1s infinite alternate;
}

@keyframes blurText {
    0% {
        filter: blur(0px);
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        filter: blur(4px);
        opacity: 0.7;
        transform: translateY(-5px);
    }
}