:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* Header */
.app-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid #23232f;
  background: var(--bg-primary);
  flex-shrink: 0;
}
.logo-row { display: flex; align-items: center; gap: 14px; }
.logo-badge {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #001018; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px; flex-shrink: 0;
}
.app-header h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.3px; }
.subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.sub-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.sub-header h2 { font-size: 20px; font-weight: 600; }
.icon-btn {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 10px; background: var(--bg-tertiary);
  color: var(--text-primary); font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* Content */
.content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.home-content { display: flex; flex-direction: column; gap: 10px; }

/* Buttons */
.btn {
  width: 100%; border-radius: var(--radius-md);
  font-family: inherit; color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.btn-primary {
  flex-direction: column; gap: 2px; min-height: 88px;
  background: linear-gradient(135deg, var(--accent), #0090c0);
  color: #001018;
}
.btn-label { font-size: 24px; font-weight: 800; letter-spacing: 0.3px; }
.btn-sub { font-size: 13px; font-weight: 600; opacity: 0.82; }
.btn-ghost {
  min-height: 52px; background: var(--bg-tertiary);
  color: var(--text-primary); font-size: 16px; font-weight: 600;
}

/* Options */
.opt {
  min-height: 52px; border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.opt-label { font-size: 16px; color: var(--text-secondary); font-weight: 500; }
.opt-value {
  font-size: 18px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; min-width: 56px; text-align: right;
}

.total-line { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Hint footer */
.hint { padding: 12px; text-align: center; font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

/* Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.uuid-row {
  min-height: 52px; border-radius: 10px;
  background: var(--bg-secondary);
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px;
}
.uuid-num {
  flex-shrink: 0; min-width: 30px;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-align: right; font-variant-numeric: tabular-nums;
}
.uuid-text {
  font-family: var(--mono); font-size: 15px; color: var(--text-primary);
  letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* History rows */
.hist-row {
  min-height: 60px; border-radius: 10px;
  background: var(--bg-secondary);
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
}
.hist-count {
  flex-shrink: 0; min-width: 50px;
  font-size: 18px; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hist-meta { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.hist-time { font-size: 13px; color: var(--text-secondary); }
.hist-preview { font-family: var(--mono); font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--text-muted); font-size: 15px; padding: 48px 20px; line-height: 1.5; }

/* Action bar */
.action-bar {
  display: flex; gap: 12px; padding: 14px 20px;
  border-top: 1px solid #23232f; background: var(--bg-primary);
  flex-shrink: 0; min-height: 84px; align-items: center;
}
.btn-bar { flex: 1; width: auto; min-height: 56px; background: var(--bg-tertiary); font-size: 16px; font-weight: 700; }
.btn-danger { color: var(--danger); }

/* Toast */
.toast {
  position: absolute; left: 50%; bottom: 100px;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-tertiary); color: var(--text-primary);
  padding: 12px 22px; border-radius: 24px; font-size: 15px; font-weight: 600;
  border: 1px solid #33334a;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
