:root { --bg: #1a1a2e; --surface: #16213e; --accent: #e94560; --accent2: #0f3460; --text: #eaeaea; --text-dim: #888; --radius: 12px; --btn-h: 64px; } * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; } #app { max-width: 600px; margin: 0 auto; padding: 16px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; min-height: 100vh; } /* gap fallback: margin between every direct child */ #app > * + * { margin-top: 16px; } /* Status bar */ #status-bar { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; font-size: 12px; color: var(--text-dim); } #status-bar > * + * { margin-left: 8px; } #winamp-status { font-size: 16px; } #winamp-status.ok { color: #4caf50; } #winamp-status.err { color: var(--accent); } /* Track info */ #track-info { background: var(--surface); border-radius: var(--radius); padding: 20px; text-align: center; } #track-title { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #star-rating { font-size: 32px; margin-top: 10px; letter-spacing: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; } .star { color: #333; -webkit-transition: color 0.12s, -webkit-transform 0.1s; transition: color 0.12s, transform 0.1s; display: inline-block; } .star.lit { color: #f5a623; } .star:active { -webkit-transform: scale(1.25); transform: scale(1.25); } #playlist-pos { font-size: 12px; color: var(--text-dim); margin-top: 6px; } /* Visualisation canvas */ #viz { width: 100%; height: 80px; border-radius: var(--radius); background: #000; display: block; cursor: pointer; } /* Progress */ #progress-wrap { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; } #progress-wrap > * + * { margin-top: 4px; } #progress-bar { height: 8px; background: var(--accent2); border-radius: 4px; overflow: hidden; cursor: pointer; } #progress-fill { height: 100%; background: var(--accent); width: 0%; -webkit-transition: width 0.5s linear; transition: width 0.5s linear; border-radius: 4px; } #time-display { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; font-size: 12px; color: var(--text-dim); } /* Buttons base */ .btn { background: var(--surface); color: var(--text); border: none; border-radius: var(--radius); font-size: 22px; cursor: pointer; -webkit-transition: background 0.15s, -webkit-transform 0.08s; transition: background 0.15s, transform 0.08s; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; touch-action: manipulation; } .btn:active { -webkit-transform: scale(0.93); transform: scale(0.93); background: var(--accent2); } /* ── Seek row ────────────────────────────────────────────────────────────── */ /* Base: flexbox (iOS 9 and up) */ #seek-row { display: -webkit-flex; display: flex; } #seek-row > .btn-seek { -webkit-flex: 1; flex: 1; } #seek-row > .btn-seek + .btn-seek { margin-left: 8px; } /* Enhancement: CSS Grid (iOS 10.3+, all modern browsers) */ @supports (display: grid) { #seek-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } #seek-row > .btn-seek { -webkit-flex: none; flex: none; } #seek-row > .btn-seek + .btn-seek { margin-left: 0; } } .btn-seek { height: 52px; font-size: 14px; font-weight: 600; } /* ── Controls row ───────────────────────────────────────────────────────── */ /* Base: flexbox */ #controls-row { display: -webkit-flex; display: flex; } #controls-row > .btn-ctrl { -webkit-flex: 1; flex: 1; } #controls-row > .btn-ctrl + .btn-ctrl { margin-left: 8px; } /* Enhancement: CSS Grid */ @supports (display: grid) { #controls-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } #controls-row > .btn-ctrl { -webkit-flex: none; flex: none; } #controls-row > .btn-ctrl + .btn-ctrl { margin-left: 0; } } .btn-ctrl { height: var(--btn-h); font-size: 28px; } .btn-play { background: var(--accent); font-size: 32px; } .btn-play:active { background: #c73652; } /* Volume row */ #volume-row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; } #volume-row > * + * { margin-left: 10px; } .btn-vol { width: 48px; height: 48px; -webkit-flex-shrink: 0; flex-shrink: 0; font-size: 18px; } #btn-mute { font-size: 22px; } #btn-mute.muted { color: var(--accent); } #volume-bar-wrap { -webkit-flex: 1; flex: 1; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; } #volume-bar-wrap > * + * { margin-top: 4px; } #volume-bar { height: 8px; background: var(--accent2); border-radius: 4px; overflow: hidden; cursor: pointer; } #volume-fill { height: 100%; background: #4caf50; width: 70%; -webkit-transition: width 0.2s; transition: width 0.2s; border-radius: 4px; } #volume-pct { font-size: 11px; color: var(--text-dim); text-align: center; } #volume-fill.muted { background: var(--accent); } /* Killist */ #killist-row { display: -webkit-flex; display: flex; } #killist-row > * + * { margin-left: 8px; } .btn-kill { -webkit-flex: 1; flex: 1; height: 52px; font-size: 16px; background: #3a1a1a; } .btn-kill:active { background: var(--accent); } .btn-kill-list { width: 64px; height: 52px; font-size: 14px; } .btn-action { width: 52px; height: 52px; font-size: 20px; } #killist-panel { background: var(--surface); border-radius: var(--radius); padding: 16px; } #killist-panel h3 { margin-bottom: 12px; } #killist-items { list-style: none; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; } #killist-items li + li { margin-top: 8px; } #killist-items li { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; -webkit-align-items: center; align-items: center; background: var(--bg); border-radius: 8px; padding: 8px 12px; font-size: 14px; } #killist-items li button { background: var(--accent); color: white; border: none; border-radius: 6px; padding: 4px 10px; cursor: pointer; } #btn-close-killist { margin-top: 12px; width: 100%; height: 44px; font-size: 15px; } /* ── Playlist overlay ────────────────────────────────────────────────────── */ #playlist-overlay { position: fixed; /* inset: 0 fallback for browsers without inset support (iOS < 14.5) */ top: 0; right: 0; bottom: 0; left: 0; z-index: 200; background: var(--bg); display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; } #playlist-header { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid #ffffff12; -webkit-flex-shrink: 0; flex-shrink: 0; } #playlist-title-label { font-size: 16px; font-weight: 600; } #btn-close-playlist { background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1; touch-action: manipulation; } #btn-close-playlist:active { background: var(--accent2); color: var(--text); } #playlist-list { list-style: none; overflow-y: auto; -webkit-flex: 1; flex: 1; padding: 8px 0; -webkit-overflow-scrolling: touch; } #playlist-list li { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 12px 20px; cursor: pointer; border-radius: 0; -webkit-transition: background 0.1s; transition: background 0.1s; -webkit-tap-highlight-color: transparent; } #playlist-list li > * + * { margin-left: 12px; } #playlist-list li:active { background: var(--accent2); } #playlist-list li.current { background: #e9456018; border-left: 3px solid var(--accent); padding-left: 17px; } .pl-idx { font-size: 12px; color: var(--text-dim); min-width: 32px; text-align: right; -webkit-flex-shrink: 0; flex-shrink: 0; } .pl-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } li.current .pl-title { color: var(--accent); font-weight: 600; } #playlist-loading { text-align: center; color: var(--text-dim); padding: 40px; font-size: 14px; } /* ── gap enhancement for all flex containers (iOS 14.5+ / modern browsers) */ @supports (gap: 1px) { #app { gap: 16px; } #app > * + * { margin-top: 0; } #status-bar { gap: 8px; } #status-bar > * + * { margin-left: 0; } #progress-wrap { gap: 4px; } #progress-wrap > * + * { margin-top: 0; } #volume-row { gap: 10px; } #volume-row > * + * { margin-left: 0; } #volume-bar-wrap { gap: 4px; } #volume-bar-wrap > * + * { margin-top: 0; } #killist-row { gap: 8px; } #killist-row > * + * { margin-left: 0; } #killist-items { gap: 8px; } #killist-items li + li { margin-top: 0; } #playlist-list li { gap: 12px; } #playlist-list li > * + * { margin-left: 0; } } .hidden { display: none !important; }