Web-based Winamp controller for CarPC � Go backend, mobile-first UI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

200 line
4.0KB

  1. :root {
  2. --bg: #1a1a2e;
  3. --surface: #16213e;
  4. --accent: #e94560;
  5. --accent2: #0f3460;
  6. --text: #eaeaea;
  7. --text-dim: #888;
  8. --radius: 12px;
  9. --btn-h: 64px;
  10. }
  11. * { box-sizing: border-box; margin: 0; padding: 0; }
  12. html, body {
  13. height: 100%;
  14. background: var(--bg);
  15. color: var(--text);
  16. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  17. -webkit-tap-highlight-color: transparent;
  18. user-select: none;
  19. }
  20. #app {
  21. max-width: 600px;
  22. margin: 0 auto;
  23. padding: 16px;
  24. display: flex;
  25. flex-direction: column;
  26. gap: 16px;
  27. min-height: 100vh;
  28. }
  29. /* Status bar */
  30. #status-bar {
  31. display: flex;
  32. align-items: center;
  33. gap: 8px;
  34. font-size: 12px;
  35. color: var(--text-dim);
  36. }
  37. #winamp-status { font-size: 16px; }
  38. #winamp-status.ok { color: #4caf50; }
  39. #winamp-status.err { color: var(--accent); }
  40. /* Track info */
  41. #track-info {
  42. background: var(--surface);
  43. border-radius: var(--radius);
  44. padding: 20px;
  45. text-align: center;
  46. }
  47. #track-title {
  48. font-size: 18px;
  49. font-weight: 600;
  50. white-space: nowrap;
  51. overflow: hidden;
  52. text-overflow: ellipsis;
  53. }
  54. #playlist-pos {
  55. font-size: 12px;
  56. color: var(--text-dim);
  57. margin-top: 4px;
  58. }
  59. /* Progress */
  60. #progress-wrap {
  61. display: flex;
  62. flex-direction: column;
  63. gap: 4px;
  64. }
  65. #progress-bar {
  66. height: 8px;
  67. background: var(--accent2);
  68. border-radius: 4px;
  69. overflow: hidden;
  70. cursor: pointer;
  71. }
  72. #progress-fill {
  73. height: 100%;
  74. background: var(--accent);
  75. width: 0%;
  76. transition: width 0.5s linear;
  77. border-radius: 4px;
  78. }
  79. #time-display {
  80. display: flex;
  81. justify-content: space-between;
  82. font-size: 12px;
  83. color: var(--text-dim);
  84. }
  85. /* Buttons base */
  86. .btn {
  87. background: var(--surface);
  88. color: var(--text);
  89. border: none;
  90. border-radius: var(--radius);
  91. font-size: 22px;
  92. cursor: pointer;
  93. transition: background 0.15s, transform 0.08s;
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. touch-action: manipulation;
  98. }
  99. .btn:active { transform: scale(0.93); background: var(--accent2); }
  100. /* Seek row */
  101. #seek-row {
  102. display: grid;
  103. grid-template-columns: repeat(4, 1fr);
  104. gap: 8px;
  105. }
  106. .btn-seek {
  107. height: 52px;
  108. font-size: 14px;
  109. font-weight: 600;
  110. }
  111. /* Controls row */
  112. #controls-row {
  113. display: grid;
  114. grid-template-columns: repeat(4, 1fr);
  115. gap: 8px;
  116. }
  117. .btn-ctrl { height: var(--btn-h); font-size: 28px; }
  118. .btn-play {
  119. background: var(--accent);
  120. font-size: 32px;
  121. }
  122. .btn-play:active { background: #c73652; }
  123. /* Volume row */
  124. #volume-row {
  125. display: flex;
  126. align-items: center;
  127. gap: 10px;
  128. }
  129. .btn-vol { width: 48px; height: 48px; flex-shrink: 0; font-size: 18px; }
  130. #btn-mute { font-size: 22px; }
  131. #btn-mute.muted { color: var(--accent); }
  132. #volume-bar-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  133. #volume-bar {
  134. height: 8px;
  135. background: var(--accent2);
  136. border-radius: 4px;
  137. overflow: hidden;
  138. cursor: pointer;
  139. }
  140. #volume-fill {
  141. height: 100%;
  142. background: #4caf50;
  143. width: 70%;
  144. transition: width 0.2s;
  145. border-radius: 4px;
  146. }
  147. #volume-pct {
  148. font-size: 11px;
  149. color: var(--text-dim);
  150. text-align: center;
  151. }
  152. #volume-fill.muted { background: var(--accent); }
  153. /* Killist */
  154. #killist-row {
  155. display: flex;
  156. gap: 8px;
  157. }
  158. .btn-kill { flex: 1; height: 52px; font-size: 16px; background: #3a1a1a; }
  159. .btn-kill:active { background: var(--accent); }
  160. .btn-kill-list { width: 80px; height: 52px; font-size: 14px; }
  161. #killist-panel {
  162. background: var(--surface);
  163. border-radius: var(--radius);
  164. padding: 16px;
  165. }
  166. #killist-panel h3 { margin-bottom: 12px; }
  167. #killist-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
  168. #killist-items li {
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. background: var(--bg);
  173. border-radius: 8px;
  174. padding: 8px 12px;
  175. font-size: 14px;
  176. }
  177. #killist-items li button {
  178. background: var(--accent);
  179. color: white;
  180. border: none;
  181. border-radius: 6px;
  182. padding: 4px 10px;
  183. cursor: pointer;
  184. }
  185. #btn-close-killist { margin-top: 12px; width: 100%; height: 44px; font-size: 15px; }
  186. .hidden { display: none !important; }