/* hillsbury_8x32 — mobile-first styling */

:root {
  --bg:         #0a0a0a;
  --bg-panel:   #14171a;
  --bg-input:   #1d2125;
  --border:     #2a2f35;
  --text:       #e8e8e8;
  --text-dim:   #8a8f95;
  --accent:     #ff7733;
  --accent-dim: #cc5522;
  --success:    #50c878;
  --danger:     #e65050;
}

* { 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', Roboto, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
}

.hdr-sub {
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-connect {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-connect.connected {
  background: var(--success);
  border-color: var(--success);
}

/* ---------- Main ---------- */
.main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.panel h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-val {
  font-family: monospace;
  color: var(--accent);
  font-size: 14px;
}

.status {
  font-size: 14px;
  color: var(--text-dim);
  font-family: monospace;
}

/* ---------- Effects grid ---------- */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.effect-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.effect-btn:active { transform: scale(0.96); }

.effect-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(255, 119, 51, 0.3);
}

.effect-icon {
  font-size: 22px;
}

.effect-name {
  font-weight: 500;
}

/* ---------- Color pickers ---------- */
.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-row input[type="color"] {
  width: 56px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  cursor: pointer;
}

.color-swatch {
  flex: 1;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ---------- Sliders ---------- */
.slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-input);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 12px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: monospace;
}
