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

body {
    background-color: #0c0c0e;
    color: #ffffff;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-card {
    width: 100%;
    background-color: #141417;
    border: 1px solid #222226;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.player-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #222226;
    padding-bottom: 14px;
}

.station-logo {
    width: 220px;
    height: auto;
    filter: brightness(0.9) contrast(1.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #88888d;
    text-transform: uppercase;
}

.pulse-dot {
    width: 5px;
    height: 5px;
    background-color: #ff3344;
    border-radius: 50%;
    display: inline-block;
}

.live-indicator-active .pulse-dot {
    animation: blink 1.2s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.separator {
    color: #333336;
}

.listener-count {
    font-variant-numeric: tabular-nums;
}

.now-playing-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.track-row {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.art-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: #1a1a1f;
    border: 1px solid #222226;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.cover-art.buffering {
    filter: brightness(0.4);
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(12, 12, 14, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.track-info {
    text-align: left;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    user-select: none;
}

.track-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.track-info:hover .track-title {
    color: #88888d;
    text-decoration: underline;
}

.track-artist {
    font-size: 0.8rem;
    color: #88888d;
    font-weight: 400;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar-bg {
    width: 100%;
    height: 2px;
    background-color: #222226;
    border-radius: 1px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #ffffff;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #55555a;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.volume-btn {
    background: transparent;
    border: none;
    color: #88888d;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.volume-btn:hover {
    color: #ffffff;
}

.volume-btn svg {
    width: 14px;
    height: 14px;
}

.volume-slider-wrapper {
    flex-grow: 1;
    position: relative;
    height: 12px;
    display: flex;
    align-items: center;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 2px;
    background: #222226;
    border-radius: 1px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
}

.volume-slider-fill {
    position: absolute;
    left: 0;
    height: 2px;
    background-color: #ffffff;
    pointer-events: none;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    color: #0c0c0e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease, background-color 0.3s ease, color 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    background-color: #f0f0f5;
}

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

.play-btn.playing {
    background-color: #141417;
    color: #ffffff;
    border: 1px solid #222226;
}

#play-noise-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-btn.playing #play-noise-canvas {
    opacity: 1;
}

.play-btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.quality-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #1a1a1f;
    border: 1px solid #222226;
    border-radius: 4px;
    padding: 6px 24px 6px 8px;
    color: #88888d;
    font-size: 0.7rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, color 0.2s;
    text-align-last: right;
    max-width: 110px;
}

.quality-select:hover, .quality-select:focus {
    border-color: #44444a;
    color: #ffffff;
}

.select-arrow {
    position: absolute;
    right: 8px;
    width: 10px;
    height: 10px;
    color: #55555a;
    pointer-events: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    background-color: #ffffff;
    color: #0c0c0e;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 100;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.hidden {
    display: none !important;
}

.next-up-footer {
    border-top: 1px solid #222226;
    padding-top: 12px;
    display: flex;
    gap: 6px;
    font-size: 0.72rem;
    color: #88888d;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.next-up-label {
    font-weight: 700;
    color: #55555a;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.next-up-title {
    font-weight: 400;
    color: #88888d;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.72rem;
    color: #55555a;
}

.footer-link {
    color: #55555a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-sep {
    color: #222226;
}
