/* css/player.css */
#header-radio { display: grid; grid-template-columns: 200px 1fr 340px; gap: 40px; padding: 20px calc(max(40px, 50vw - 800px)); background-color: #110e0c; border-bottom: 2px solid #28231f; align-items: center; flex-shrink: 0; }

#branding { background-color: rgba(24, 21, 18, 0.75); border: 1px solid #28231f; border-radius: 16px; height: 160px; box-sizing: border-box; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; flex-shrink: 0; text-align: center; color: var(--theme-light); }
.sansai-logo { width: 84px; height: 84px; color: var(--theme-primary); transition: color 0.3s; }
#branding:hover .sansai-logo { color: var(--theme-light); }
.branding-en { font-size: 11px; font-weight: 700; color: var(--theme-light); letter-spacing: 5px; }
.branding-jp { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: 700; color: var(--theme-primary); letter-spacing: 2px; }

.anim-petal { transform-origin: 50px 50px; transform: scale(0) rotate(0deg); opacity: 0; transition: transform 0.4s ease-in, opacity 0.3s ease-in; }
.kamon-center { transition: fill 0.3s ease; }
#branding.is-streaming .kamon-center { fill: #ff5555; }
#branding.is-live .anim-petal { transform: scale(1) rotate(var(--end-rot)); opacity: 1; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease-out; transition-delay: calc(var(--index) * 0.04s); }

#player-wrapper { display: flex; align-items: center; gap: 40px; min-width: 0; }
#artwork-container { position: relative; width: 160px; height: 160px; background: #000; border: 1px solid #28231f; border-radius: 16px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
#thumb-img { width: 100%; height: 100%; object-fit: cover; display: none; background-color: #000; }
#thumb-img:not([src]) { visibility: hidden; }
#video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10; display: flex; align-items: center; justify-content: center; color: var(--theme-primary); font-family: monospace; cursor: pointer; text-align: center; border: 1px solid var(--theme-primary); box-sizing: border-box; border-radius: 16px; }
#player { position: absolute; top: 0; left: 0; opacity: 0.01; z-index: -1; pointer-events: none; }

#meta-container { width: 100%; min-height: 80px; display: flex; flex-direction: column; justify-content: center; }
.meta-label { color: #666; margin-right: 2px; font-size: 11px; font-weight: bold; letter-spacing: 1px; }
#song-title { font-size: 32px; margin: 0; color: #e8e8e8; font-weight: 700; border-bottom: none; }
#song-details { color: #888; margin-bottom: 10px; font-size: 12px; }
#artist { color: var(--theme-light); }
.divider { color: #666; margin: 0 5px; user-select: none; }

#live-indicator { font-family: monospace; font-size: 11px; color: var(--theme-primary); margin-bottom: 10px; letter-spacing: 1px; }
.dot { height: 8px; width: 8px; background-color: var(--theme-primary); border-radius: 50%; display: inline-block; margin-right: 5px; box-shadow: 0 0 5px var(--theme-primary); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
#progress-timer { display: inline-block; min-width: 80px; font-variant-numeric: tabular-nums; letter-spacing: 1px; margin-left: 5px; }

#play-btn { background: linear-gradient(145deg, var(--theme-light), var(--theme-primary)); color: #110e0c; border: none; padding: 0; width: 48px; height: 48px; cursor: pointer; border-radius: 8px; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(var(--theme-accent-rgb), 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.4); }
#play-btn svg { width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) { #play-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--theme-accent-rgb), 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.5); } }
#play-btn:active { transform: scale(0.95); box-shadow: 0 2px 5px rgba(var(--theme-accent-rgb), 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2); }

#controls { display: flex; align-items: center; gap: 12px; line-height: 0; }
#controls.disabled-controls { pointer-events: none !important; opacity: 0.2 !important; filter: grayscale(1); cursor: not-allowed; transition: all 0.5s ease; }
.live-hide { display: none !important; }

#volume-container { display: flex; align-items: center; gap: 8px; }
#volume-slider { -webkit-appearance: none; width: 140px; height: 4px; background: #28231f; outline: none; border-radius: 2px; }
#volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; background: var(--theme-primary); cursor: pointer; border-radius: 50%; transition: background 0.2s; }
#volume-slider::-webkit-slider-thumb:hover { background: var(--theme-light); }
#volume-slider::-moz-range-thumb { width: 12px; height: 12px; background: var(--theme-primary); cursor: pointer; border-radius: 50%; border: none; transition: background 0.2s; }
#volume-slider::-moz-range-thumb:hover { background: var(--theme-light); }
#mute-btn { cursor: pointer; color: var(--theme-light); transition: 0.2s; user-select: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
#mute-btn:hover { color: var(--theme-primary); }
#mute-btn.is-muted { color: #ff5555; }

#dj-container { width: 160px; height: 160px; background: #110e0c; border: 1px solid #28231f; border-radius: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 15px; box-sizing: border-box; position: relative; justify-self: end; }
.dj-live-wrapper { position: relative; width: 100%; height: 100%; clip-path: inset(0 round 8px); -webkit-clip-path: inset(0 round 8px); border-radius: 8px; }
.dj-live-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.dj-live-name { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); font-size: 14px; font-weight: 700; color: #e8e8e8; text-align: center; letter-spacing: 0.5px; padding: 6px 0; box-sizing: border-box; }
.dj-live-badge { position: absolute; top: 10px; right: 10px; background-color: #ff5555; color: #111; font-size: 9px; font-weight: bold; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; z-index: 5; }

/* === MOBILE HEADER FIXES === */
@media (max-width: 900px) {
    #header-radio { display: flex; position: relative; flex-wrap: wrap; height: auto; padding: 15px; gap: 15px; align-items: center; }
    #branding { width: 100%; height: 48px; flex-direction: row; padding: 0; background: transparent; border: none; position: relative; left: 20px; }
    .sansai-logo { width: 32px; height: 32px; }
    .branding-text { gap: 8px; }
    .branding-en { font-size: 14px; letter-spacing: 3px; }
    .branding-jp { font-size: 13px; }
    #player-wrapper { flex: 1; gap: 12px; min-width: 0; }
    #artwork-container { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; }
    #video-overlay { font-size: 8px; line-height: 1.2; border-radius: 8px; padding: 2px; }
    #dj-container { width: 64px; height: 64px; padding: 0; border-radius: 8px; gap: 0; overflow: hidden; flex-shrink: 0; }
    #dj-container span { text-align: center; line-height: 1.2; }
    #meta-container { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
    #live-indicator { margin-bottom: 2px; font-size: 9px; }
    #song-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
    #song-details { font-size: 10px; margin-bottom: 6px; }
    #controls { gap: 10px; }
    #play-btn { width: 36px; height: 36px; border-radius: 6px; }
    #play-btn svg { width: 18px; height: 18px; }
    #volume-slider, #quality-container, #mute-btn { display: none; }
    #player { transform: scale(0.4); transform-origin: top left; }
    .dj-live-wrapper { position: relative; width: 100%; height: 100%; clip-path: inset(0 round 8px); -webkit-clip-path: inset(0 round 8px); border-radius: 8px; }
    .dj-live-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
    .dj-live-name { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); font-size: 11px; font-weight: 700; color: #e8e8e8; text-align: center; padding: 4px 0; }
}