/* ===== Australia Checklist - Terminal Dark Theme ===== */
:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --success-bg: rgba(63, 185, 80, 0.15);
  --warning: #d29922;
  --danger: #f85149;
  --kangaroo: #ff7b00;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --radius: 6px;
  --radius-sm: 4px;
  --transition: 150ms ease;
}

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-ui); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5; }

/* Fireworks Canvas */
.fireworks-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000;
}

/* Terminal Frame */
.terminal {
  max-width: 900px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border);
  box-shadow: 0 0 0 1px var(--border), 0 8px 32px rgba(0,0,0,0.5);
}

.terminal-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #11161d; border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }
.terminal-dots .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dots .red { background: #ff5f57; }
.terminal-dots .yellow { background: #ffbd2e; }
.terminal-dots .green { background: #28ca42; }
.terminal-title { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); flex: 1; }

.terminal-body { flex: 1; padding: 24px; overflow-y: auto; }
.terminal-footer {
  display: flex; justify-content: space-between; padding: 8px 16px;
  background: #11161d; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}

/* Login Page */
.login-container { max-width: 360px; margin: 40px auto; text-align: center; }
.logo { margin-bottom: 32px; }
.logo .kangaroo { font-size: 48px; display: block; margin-bottom: 8px; animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.logo h1 { font-size: 28px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.subtitle { color: var(--text-muted); font-size: 14px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; font-family: var(--font-mono); }
.form-group input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,0.2); }
.form-group input::placeholder { color: var(--text-muted); opacity: 0.6; }

.btn-login {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #3a8ae0); color: #0d1117;
  font-family: var(--font-ui); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-login:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(88,166,255,0.3); }
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-loader { font-family: var(--font-mono); letter-spacing: 2px; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.error-message { color: var(--danger); font-size: 13px; margin-top: 12px; padding: 10px; background: rgba(248,81,73,0.1); border: 1px solid rgba(248,81,73,0.3); border-radius: var(--radius); }

.hint { margin-top: 24px; padding: 12px; background: rgba(88,166,255,0.05); border: 1px dashed var(--accent); border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); text-align: left; }
.hint .prompt { color: var(--success); }
.hint strong { color: var(--text); }

/* App Header */
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 12px; }
.kangaroo-large { font-size: 32px; }
.header-left h1 { font-size: 22px; font-weight: 600; }

.header-right { display: flex; align-items: center; gap: 12px; }

/* Progress Ring */
.progress-ring { position: relative; width: 64px; height: 64px; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--border); }
.ring-progress { stroke: var(--success); stroke-linecap: round; transition: stroke-dashoffset 500ms ease; }
.progress-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text); }

.btn-logout { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-muted); font-size: 16px; cursor: pointer; transition: all var(--transition); }
.btn-logout:hover { background: var(--danger); border-color: var(--danger); color: white; }

/* Smiley */
.smiley-container { display: flex; flex-direction: column; align-items: center; margin: 20px 0 24px; }
#smileyCanvas { filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3)); transition: transform 300ms ease; }
#smileyCanvas:hover { transform: scale(1.05); }
.smiley-label { margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); min-height: 18px; text-align: center; }

/* Checklist */
.checklist-container { display: flex; flex-direction: column; gap: 16px; }
.category { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.category-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: rgba(88,166,255,0.05); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; transition: background var(--transition); }
.category-header:hover { background: rgba(88,166,255,0.1); }
.category-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.category-icon { font-size: 18px; }
.category-progress { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); }
.category-toggle { font-family: var(--font-mono); font-size: 16px; color: var(--text-muted); transition: transform var(--transition); }
.category.collapsed .category-toggle { transform: rotate(-90deg); }
.category.collapsed .category-body { display: none; }

.category-body { padding: 8px; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); transition: background var(--transition); margin-bottom: 4px; }
.task:hover { background: rgba(88,166,255,0.04); }
.task.completed { background: var(--success-bg); border: 1px solid rgba(63,185,80,0.3); }
.task-input { position: absolute; opacity: 0; pointer-events: none; }
.task-checkbox { position: relative; width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; cursor: pointer; border: 2px solid var(--border); border-radius: 4px; background: var(--bg); transition: all var(--transition); display: flex; align-items: center; justify-content: center; }
.task-checkbox::after { content: ''; width: 10px; height: 10px; background: var(--success); border-radius: 2px; transform: scale(0); transition: transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.task.completed .task-checkbox { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 3px rgba(63,185,80,0.2); }
.task.completed .task-checkbox::after { transform: scale(1); }
.task-checkbox:hover:not(.task.completed .task-checkbox) { border-color: var(--accent); }

.task-content { flex: 1; min-width: 0; }
.task.completed .task-text { text-decoration: line-through; color: var(--text-muted); }
.task-text { font-size: 14px; color: var(--text); word-break: break-word; line-height: 1.5; }
.task.completed .task-text::before { content: '✓ '; color: var(--success); font-weight: 600; }

/* Footer */
.app-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.stats { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.stats #statDone { color: var(--success); font-weight: 600; }
.stats #statTotal { color: var(--accent); font-weight: 600; }
.motivation { font-size: 13px; color: var(--text-muted); font-style: italic; min-height: 20px; }

/* Responsive */
@media (max-width: 600px) {
  .terminal { border-radius: 0; min-height: 100vh; }
  .terminal-body { padding: 16px; }
  .app-header { flex-direction: column; align-items: flex-start; }
  .header-right { width: 100%; justify-content: space-between; }
  .smiley-container { margin: 16px 0; }
  #smileyCanvas { width: 100px; height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}