/* ============================================================================
   SYNCRADIO - MODERN DARK INTERNET RADIO STATION
   ============================================================================ */

/* Root Variables */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --bg-tertiary: #2A2A2A;
    --accent: #00D4FF;
    --accent-hover: #00E8FF;
    --live: #FF3B30;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --text-tertiary: #888888;
    --border: #333333;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
    --transition: 0.3s ease;
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0a0a0a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================================
   CONTAINER & LAYOUT
   ============================================================================ */

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
        gap: 12px;
    }
}

/* ============================================================================
   HEADER
   ============================================================================ */

.header {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInDown 0.6s ease;
}

.header-content {
    padding: 30px 20px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 32px;
    animation: spin 20s linear infinite;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #00B8D4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .header-content {
        padding: 20px 16px;
    }
}

/* ============================================================================
   START SCREEN
   ============================================================================ */

.start-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    animation: fadeIn 0.8s ease;
}

.start-screen.hidden {
    display: none;
}

.start-content {
    text-align: center;
    padding: 60px 40px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 500px;
}

.start-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: pulse-live 2s ease-in-out infinite;
}

.start-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.start-content p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1rem;
}

.btn-start {
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent), #00B8D4));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
    letter-spacing: 0.5px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.4);
}

.btn-start:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .start-content {
        padding: 40px 24px;
    }

    .start-icon {
        font-size: 60px;
    }

    .start-content h2 {
        font-size: 1.5rem;
    }

    .btn-start {
        padding: 14px 36px;
        font-size: 1rem;
    }
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.6s ease;
}

.main-content.hidden {
    display: none;
}

@media (max-width: 768px) {
    .main-content {
        gap: 16px;
    }
}

/* ============================================================================
   LIVE INDICATOR
   ============================================================================ */

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--live);
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: var(--live);
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
    }
}

/* ============================================================================
   PANELS
   ============================================================================ */

.panel {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all var(--transition);
}

.panel:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 18px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .panel {
        padding: 18px;
    }

    .panel h2 {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }
}

/* ============================================================================
   NOW PLAYING PANEL
   ============================================================================ */

.now-playing-panel {
    order: 1;
}

.song-info {
    margin-bottom: 20px;
}

.song-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent), #00B8D4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.playback-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.separator {
    opacity: 0.5;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    cursor: not-allowed;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00B8D4));
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition);
}

.control-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.1);
}

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

.play-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #00B8D4));
    border: none;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.4);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 200px;
}

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

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    transition: all var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    transition: all var(--transition);
}

.volume-slider::-moz-range-thumb:hover {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.volume-slider::-moz-range-track {
    background: transparent;
    border: none;
}

@media (max-width: 600px) {
    .player-controls {
        gap: 16px;
    }

    .control-btn {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .play-btn {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .volume-control {
        max-width: 150px;
    }
}

/* ============================================================================
   STATUS PANEL
   ============================================================================ */

.status-panel {
    order: 2;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.live {
    background: var(--live);
    animation: pulse-live 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .status-item {
        padding: 12px;
    }
}

/* ============================================================================
   UPCOMING PANEL
   ============================================================================ */

.upcoming-panel {
    order: 3;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-item {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.upcoming-item:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: translateX(4px);
}

.upcoming-item::before {
    content: attr(data-index);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}

.upcoming-item span {
    flex: 1;
}

@media (max-width: 768px) {
    .upcoming-list {
        gap: 10px;
    }

    .upcoming-item {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer-info {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.footer-info p {
    margin: 6px 0;
}

.tech-info {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 300;
}

@media (max-width: 768px) {
    .footer-info {
        padding: 16px;
        font-size: 0.85rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .panel {
        border-color: var(--accent);
    }

    .control-btn {
        border-color: var(--text-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode (system preference) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f5f5;
        --bg-secondary: #ffffff;
        --bg-tertiary: #e8e8e8;
        --text-primary: #000000;
        --text-secondary: #666666;
        --text-tertiary: #999999;
        --border: #dddddd;
    }

    body {
        background: linear-gradient(135deg, var(--bg-primary) 0%, #ffffff 100%);
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.hidden {
    display: none !important;
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    .panel {
        border: 1px solid #999;
    }
}
