/* =========================================================
   GESTURE TODO — style.css
   Dark AR/HUD aesthetic · Exo 2 + DM Sans
   ========================================================= */

/* ── Reset & Variables ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sidebar-w:    300px;
  --bg:           #050810;
  --panel-bg:     rgba(8, 12, 26, 0.92);
  --panel-border: rgba(255, 255, 255, 0.07);
  --accent-green: #00e5a0;
  --accent-blue:  #4a9eff;
  --accent-red:   #ff4466;
  --text-hi:      #e8eef8;
  --text-mid:     rgba(232, 238, 248, 0.55);
  --text-lo:      rgba(232, 238, 248, 0.28);
  --font-ui:      'Exo 2', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ── Canvas container (full viewport behind sidebar) ── */
#canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#canvas-wrap canvas {
  display: block;
}

/* ── Sidebar ── */
#sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 20;

  background: var(--panel-bg);
  border-left: 1px solid var(--panel-border);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* Subtle inner glow on left edge */
  box-shadow:
    inset 1px 0 0 rgba(74, 158, 255, 0.06),
    -20px 0 60px rgba(0, 0, 0, 0.6);
}

/* Top noise texture overlay on sidebar */
#sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.5;
}

.sidebar-top {
  padding: 28px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

/* ── Brand / Header ── */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(0, 229, 160, 0.5));
}

.brand-text h1 {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-hi);
  text-transform: uppercase;
}

.brand-text p {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-lo);
  letter-spacing: 0.02em;
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--panel-border) 30%, var(--panel-border) 70%, transparent);
  margin: 18px 0;
  flex-shrink: 0;
}

/* ── Section labels ── */
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-lo);
  margin-bottom: 12px;
}

/* ── Add task section ── */
.add-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.input-row {
  margin-bottom: 8px;
}

#task-input {
  width: 100%;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  caret-color: var(--accent-green);
}

#task-input::placeholder {
  color: var(--text-lo);
  font-weight: 300;
}

#task-input:focus {
  border-color: rgba(0, 229, 160, 0.35);
  background: rgba(0, 229, 160, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.07);
}

#add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 8px;
  color: var(--accent-green);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

#add-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,160,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

#add-btn:hover {
  background: rgba(0, 229, 160, 0.16);
  border-color: rgba(0, 229, 160, 0.45);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 229, 160, 0.15);
  transform: translateY(-1px);
}

#add-btn:hover::after { opacity: 1; }

#add-btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-plus {
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  margin-top: -1px;
}

/* ── Instructions ── */
.instructions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.instruction {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.instruction:last-child { border-bottom: none; }

.instr-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.pinch-icon { background: rgba(74, 158, 255, 0.12); border: 1px solid rgba(74, 158, 255, 0.2); }
.check-icon { background: rgba(0, 229, 160, 0.10); border: 1px solid rgba(0, 229, 160, 0.2); }
.del-icon   {
  background: rgba(255, 68, 102, 0.10);
  border: 1px solid rgba(255, 68, 102, 0.2);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  font-family: var(--font-ui);
}

.instr-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.instr-text strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-hi);
  font-family: var(--font-ui);
}

.instr-text span {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 300;
}

/* ── Sidebar Bottom ── */
.sidebar-bottom {
  padding: 0 22px 24px;
}

#cam-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  margin-bottom: 10px;
}

#status-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mid);
  letter-spacing: 0.01em;
}

/* Status dot */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot--loading {
  background: rgba(255, 200, 60, 0.8);
  box-shadow: 0 0 6px rgba(255, 200, 60, 0.5);
  animation: pulse-yellow 1.4s ease-in-out infinite;
}

.dot--ready {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(0, 229, 160, 0.6);
  animation: pulse-green 2.5s ease-in-out infinite;
}

.dot--tracking {
  background: var(--accent-blue);
  box-shadow: 0 0 8px rgba(74, 158, 255, 0.7);
  animation: pulse-blue 0.8s ease-in-out infinite;
}

.dot--pinching {
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  animation: pulse-white 0.4s ease-in-out infinite;
}

@keyframes pulse-yellow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.9); }
}

@keyframes pulse-blue {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50%       { opacity: 0.8; transform: scale(0.95); }
}

@keyframes pulse-white {
  0%, 100% { transform: scale(1.2); }
  50%       { transform: scale(0.9); }
}

#task-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-lo);
  text-align: center;
  letter-spacing: 0.08em;
  padding: 0 2px;
}

/* ── Scrollbar (hidden) ── */
::-webkit-scrollbar { display: none; }

/* ── Responsive: very narrow screens ── */
@media (max-width: 740px) {
  :root { --sidebar-w: 240px; }
  .brand-text h1 { font-size: 14px; }
}
