: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;
  --radius-sm: 8px;
}

* { 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 ===== */
.header {
  padding: 22px 24px 14px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}
.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.title-row h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.count {
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 12px;
  min-width: 36px;
  text-align: center;
}
.filters { display: flex; gap: 8px; }
.filter-btn {
  flex: 1;
  height: 46px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.filter-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent);
}

/* ===== LIST ===== */
.list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list::-webkit-scrollbar { width: 4px; }
.list::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 2px; }

.item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.item-icon {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.item.read .item-icon {
  background: var(--text-muted);
  box-shadow: none;
}
.item-body { flex: 1; min-width: 0; }
.item-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item.read .item-title {
  color: var(--text-secondary);
}
.item-domain {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 24px;
  font-size: 16px;
  line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
  padding: 14px 16px 18px;
  background: var(--bg-primary);
  border-top: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}
.add-btn {
  width: 100%;
  height: 88px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.add-btn .mic { font-size: 26px; line-height: 1; }

/* ===== VOICE ===== */
.voice-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px 32px 28px;
  background: var(--bg-primary);
}
.voice-state, .voice-result {
  flex: 1;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.mic-icon {
  font-size: 76px;
  line-height: 1;
  width: 160px; height: 160px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--bg-tertiary);
}
.mic-icon.listening {
  border-color: var(--accent);
  box-shadow: 0 0 44px var(--focus-glow);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
#voiceTitle { font-size: 23px; font-weight: 600; }
#voiceHint { font-size: 15px; color: var(--text-secondary); }
.result-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.result-title {
  font-size: 22px;
  font-weight: 600;
  max-width: 500px;
  line-height: 1.3;
}
.result-url {
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
  max-width: 500px;
}
.voice-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.primary-btn, .secondary-btn, .danger-btn {
  width: 100%;
  height: 64px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 600;
}
.primary-btn { background: var(--accent); color: #001318; }
.secondary-btn { background: var(--bg-secondary); color: var(--text-primary); }
.danger-btn { background: var(--danger); color: #ffffff; }

/* ===== DETAIL ===== */
.detail-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}
.icon-btn {
  width: 52px; height: 52px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-pill {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--accent);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}
.status-pill.read { color: var(--text-secondary); }
.detail-body {
  flex: 1;
  padding: 26px 24px;
  overflow-y: auto;
}
.detail-title {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.3;
}
.detail-domain {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 10px;
}
.detail-url {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 20px;
}
.detail-meta {
  font-size: 13px;
  color: var(--text-muted);
}
.detail-actions {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-primary);
  border-top: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}

/* ===== CONFIRM ===== */
.confirm-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 32px;
  background: var(--bg-primary);
  text-align: center;
  gap: 14px;
}
.confirm-box h2 { font-size: 24px; font-weight: 600; }
.confirm-box p {
  color: var(--text-secondary);
  font-size: 16px;
  word-break: break-word;
  line-height: 1.4;
}
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
