@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

/* Reset and high specificity to prevent theme overrides */
body .sap-player-component {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 15px 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    border-top: 4px solid #ff0000 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    z-index: 999999 !important;
    box-shadow: 0 -15px 50px rgba(255, 0, 0, 0.15) !important;
}

body .sap-module-header {
    color: #ffcccc !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    text-align: center !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

body .sap-sticky-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.9) !important;
}

body .sap-inline-player {
    margin: 40px auto !important;
    width: 100% !important;
    max-width: 500px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 0, 0.1) !important;
    padding: 30px !important;
}

body .sap-player-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

body .sap-inline-player .sap-player-inner {
    padding: 0 !important;
}

body .sap-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

body .sap-controls > * {
    flex-shrink: 0 !important;
}

body .sap-inline-player .sap-controls {
    flex-direction: column !important;
    gap: 25px !important;
    align-items: center !important;
    justify-content: center !important;
}

body .sap-inline-player .sap-main-play-wrap {
    margin: 0 !important;
}

body .sap-inline-player .sap-status-info {
    margin: 0 !important;
    align-items: center !important;
    text-align: center !important;
}

body .sap-inline-player .sap-station-selector {
    margin: 0 !important;
    width: 100% !important;
    max-width: 400px !important;
}

body .sap-inline-player .sap-info {
    margin: 0 !important;
    width: 100% !important;
}

body .sap-inline-player .sap-volume-wrap {
    margin: 0 !important;
}

body .sap-main-play-wrap {
    display: -webkit-flex !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-right: 45px !important; /* More space between play and selector */
}

body .sap-status-info {
    display: -webkit-flex !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 150px !important;
    flex-shrink: 0 !important;
}

body .sap-status-label {
    font-size: 10px !important;
    color: #4b5563 !important; /* Gray-600 */
    text-transform: uppercase !important;
    letter-spacing: 0.25em !important;
    font-weight: 900 !important;
    margin-bottom: 2px !important;
}

body .sap-current-station-name {
    font-size: 20px !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    font-style: italic !important;
    letter-spacing: -0.05em !important;
    display: block !important;
    line-height: 1.1 !important;
}

body .sap-station-selector {
    display: -webkit-flex !important;
    display: flex !important;
    justify-content: center !important;
    margin-right: 20px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

body .sap-station-selector::after {
    content: '▼' !important;
    position: absolute !important;
    right: 20px !important; /* Adjusted for larger padding */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #ff0000 !important;
    font-size: 11px !important; /* Slightly larger arrow */
    pointer-events: none !important;
    z-index: 2 !important;
}

body .sap-inline-player .sap-station-selector {
    width: 100% !important;
}

body .sap-inline-player .sap-station-selector::after {
    display: none !important;
}

body .sap-station-selector select {
    background: #111 !important;
    color: #ff0000 !important;
    border: 2px solid rgba(255, 0, 0, 0.5) !important;
    padding: 14px 50px 14px 30px !important; /* More generous padding */
    border-radius: 16px !important;
    font-size: 16px !important; /* Even larger font */
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    outline: none !important;
    height: auto !important;
    line-height: normal !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    z-index: 1 !important;
}

body .sap-station-selector select:hover {
    border-color: #ff0000 !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3) !important;
}

body .sap-station-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
}

body .sap-station-btn {
    background: #111111 !important;
    color: #ff0000 !important;
    border: 2px solid rgba(255, 0, 0, 0.2) !important;
    padding: 14px !important;
    border-radius: 14px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    letter-spacing: 0.5px !important;
}

body .sap-station-btn:hover {
    border-color: #ff0000 !important;
    transform: translateY(-2px) !important;
}

body .sap-station-btn.active {
    background: #ff0000 !important;
    color: #ffffff !important;
    border-color: #ff0000 !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5) !important;
}

/* Specific button colors for Sticky vs Inline */
body .sap-sticky-bottom .sap-btn {
    background: #ff0000 !important;
    color: #000000 !important;
}

body .sap-inline-player .sap-btn {
    background: #ff0000 !important; /* Changed to red as requested */
    color: #000000 !important;
}

body .sap-btn svg {
    width: 24px !important;
    height: 24px !important;
    color: #000000 !important; /* Force black icons */
    fill: #000000 !important;
    background: transparent !important;
    pointer-events: none !important;
}

body .sap-icon-play {
    margin-left: 3px !important; /* Slight offset for visual centering of triangle */
}

body .sap-btn {
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
    background: #ff0000 !important;
    color: #000000 !important;
}

body .sap-btn:hover {
    transform: scale(1.1) !important;
    background: #ffffff !important;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6) !important;
}

body .sap-info {
    flex-grow: 1 !important;
    min-width: 150px !important;
    margin: 0 30px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

body .sap-progress-container {
    width: 100% !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body .sap-progress-bar {
    height: 100% !important;
    background: linear-gradient(90deg, #991b1b, #ef4444) !important;
    width: 0% !important;
    border-radius: 4px !important;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5) !important;
}

body .sap-mute-btn {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer !important;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.3s ease !important;
}

body .sap-mute-btn:hover {
    color: #ff0000 !important;
}

body .sap-volume-wrap {
    display: flex !important;
    align-items: center !important;
    margin-left: 20px !important;
    background: #1a1a1a !important;
    padding: 8px 15px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body .sap-volume {
    display: flex !important;
    align-items: center !important;
}

body .sap-volume-slider {
    width: 80px !important;
    cursor: pointer !important;
    accent-color: #ff0000 !important;
    margin: 0 !important;
}

body .sap-progress-bar.sap-pulse {
    animation: sap-pulse-animation 2s infinite ease-in-out !important;
}

@keyframes sap-pulse-animation {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Responsive adjustments */
.sap-footer-spacer {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    pointer-events: none !important;
}

@media (max-width: 768px) {
    body.sap-has-sticky-player {
        padding-bottom: 0 !important;
    }
    .sap-footer-spacer {
        display: block !important;
    }
    body .sap-player-component {
        padding: 15px 0 !important;
    }
    body .sap-player-inner {
        padding: 0 !important;
        width: 100% !important;
    }
    body .sap-controls {
        gap: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        padding: 0 10px !important;
    }
    body .sap-main-play-wrap {
        margin-right: 25px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    body .sap-main-play-wrap .sap-btn {
        width: 44px !important;
        height: 44px !important;
    }
    body .sap-main-play-wrap .sap-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
    body .sap-station-selector {
        margin-right: 0 !important;
        flex-grow: 1 !important;
        max-width: 280px !important;
        min-width: 180px !important;
        display: flex !important;
        justify-content: center !important;
        position: relative !important;
    }
    body .sap-station-selector select {
        width: 100% !important;
        font-size: 16px !important; /* Larger on mobile too */
        padding: 0 40px 0 15px !important;
        height: 48px !important; /* Slightly taller for better touch target */
        text-align: center !important;
        text-align-last: center !important;
        line-height: 48px !important;
    }
    body .sap-volume-wrap {
        display: none !important;
    }
    body .sap-info {
        display: none !important;
    }
    body .sap-status-info {
        display: none !important;
    }
    body .sap-station-selector::after {
        right: 12px !important;
        font-size: 9px !important;
    }
    body .sap-inline-player .sap-station-selector::after {
        display: none !important;
    }
}
