:root {
  --bg-color: #0b0f19;
  --surface-color: #131b2e;
  --surface-hover: #1c2742;
  --surface-card: #162036;
  --surface-card-highlight: #1e2c4a;
  --border-color: #23314f;
  --border-subtle: #1c2742;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --frog-accent: #22c55e;
  --frog-glow: rgba(34, 197, 94, 0.35);
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #38bdf8;
  --purple: #a855f7;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  user-select: none;
}

#app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-color);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--frog-glow));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sync-badge:active {
  transform: scale(0.95);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.sync-dot.syncing {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
  animation: pulse 1s infinite alternate;
}

.sync-dot.error {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.sync-dot.offline {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.icon-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--surface-hover);
}

.tournament-btn {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Top Stats & Progress Bar */
.top-stats-bar {
  padding: 8px 16px 4px 16px;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-text-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stats-count-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--frog-accent);
}

.main-progress-track {
  width: 100%;
  height: 6px;
  background: var(--surface-card);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.main-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Category Filter Bar */
.category-filter-wrap {
  padding: 8px 16px 4px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filter-wrap::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 5px 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Main Scroll Area */
main {
  flex: 1;
  padding: 10px 16px 120px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* Frog of the Day Banner */
.frog-banner {
  background: linear-gradient(145deg, #10261f 0%, #162624 100%);
  border: 1.5px solid rgba(34, 197, 94, 0.5);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.frog-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--frog-accent);
  margin-bottom: 8px;
}

.frog-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 12px;
}

.frog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.frog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sections & Headers */
.section-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-left: 4px;
}

.section-count {
  font-size: 0.72rem;
  background: var(--surface-card);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.section-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 6px 0;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Task Card */
.task-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.task-card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.task-card:active {
  background: var(--surface-card-highlight);
}

.task-card.completed {
  opacity: 0.6;
  background: rgba(19, 27, 46, 0.45);
  border-color: rgba(35, 49, 79, 0.3);
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.task-card.is-frog-card {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.1);
}

.task-card.is-skipped-card {
  border-style: dashed;
  opacity: 0.75;
}

.task-checkbox-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: rgba(11, 15, 25, 0.6);
}

.task-card.completed .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.custom-checkbox svg {
  display: none;
  width: 14px;
  height: 14px;
  stroke: #0b0f19;
  stroke-width: 3;
}

.task-card.completed .custom-checkbox svg {
  display: block;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main);
  word-break: break-word;
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-tag {
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-overdue {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-today {
  background: rgba(34, 197, 94, 0.15);
  color: var(--frog-accent);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-tomorrow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-upcoming, .badge-future {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-skip {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
  border: 1px dashed var(--border-color);
}

.badge-subtask-counter {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
  cursor: pointer;
}

/* Card Actions Toolbar */
.card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-chip {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.action-chip:active {
  background: var(--surface-hover);
  color: var(--text-main);
}

.action-chip.delete-chip {
  color: rgba(239, 68, 68, 0.8);
}
.action-chip.delete-chip:active {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

/* Subtasks in Task Card */
.subtasks-container {
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(11, 15, 25, 0.45);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtask-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subtask-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.subtask-row.completed .subtask-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.subtask-chk {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.subtask-row.completed .subtask-chk {
  background: var(--primary);
  border-color: var(--primary);
}

.subtask-chk svg {
  display: none;
  width: 10px;
  height: 10px;
  stroke: #0b0f19;
  stroke-width: 3.5;
}

.subtask-row.completed .subtask-chk svg {
  display: block;
}

.subtask-title {
  word-break: break-word;
  font-size: 0.85rem;
}

.subtask-del-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 4px;
  cursor: pointer;
}

.inline-add-subtask {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.inline-sub-input {
  flex: 1;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
}

.inline-sub-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* Bottom Add Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 10px 16px calc(var(--safe-bottom) + 8px) 16px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.add-preview-chips {
  display: flex;
  gap: 6px;
  min-height: 20px;
}

.add-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.task-input {
  flex: 1;
  background: var(--surface-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 12px 18px;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.task-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.add-btn {
  background: var(--primary);
  color: #0b0f19;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.add-btn:active {
  transform: scale(0.9);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface-color);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px 20px calc(var(--safe-bottom) + 16px) 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

.field-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.custom-checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Redo Tournament Modal */
.redo-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.redo-option-card {
  background: var(--surface-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.redo-option-card:active {
  background: var(--surface-card-highlight);
  border-color: var(--primary);
  transform: scale(0.98);
}

.redo-option-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.redo-option-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Completed Log Modal */
.completed-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
}

.completed-item-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.completed-item-info {
  flex: 1;
  min-width: 0;
}

.completed-item-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  word-break: break-word;
}

.completed-item-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.btn-restore {
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  color: var(--frog-accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-restore:active {
  background: var(--primary);
  color: #0b0f19;
}

/* Edit Modal Subtasks */
.edit-subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.edit-subtask-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
}

.add-subtask-row {
  display: flex;
  gap: 8px;
}

.subtask-field {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.add-sub-btn {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Focus Screen */
.focus-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 75;
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(var(--safe-bottom) + 16px) 16px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.focus-screen.active {
  transform: translateY(0);
}

.focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.focus-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.1em;
}

.focus-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-focus-card {
  background: linear-gradient(145deg, #122822 0%, #162624 100%);
  border: 2px solid var(--frog-accent);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 12px 36px rgba(34, 197, 94, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-focus-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
}

/* Tournament Screen */
.tournament-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(var(--safe-bottom) + 16px) 16px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.tournament-screen.active {
  transform: translateY(0);
}

.tournament-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tournament-tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 40vh;
  overflow-y: auto;
}

.tournament-progress-wrap {
  width: 100%;
  height: 6px;
  background: var(--surface-card);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  overflow: hidden;
}

.tournament-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  transition: width 0.3s ease;
}

.battle-prompt {
  text-align: center;
  margin-bottom: 16px;
}

.battle-prompt h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.battle-prompt p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.battle-cards-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.battle-card {
  background: var(--surface-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  text-align: left;
}

.battle-card:active {
  transform: scale(0.97);
  border-color: var(--primary);
  background: var(--surface-card-highlight);
}

.battle-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
}

.vs-badge {
  align-self: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.battle-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Winner Screen */
.winner-celebration {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
  animation: fadeIn 0.4s ease;
}

.frog-crown-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 24px var(--frog-glow));
  animation: bounce 1.2s infinite alternate;
}

.winner-card {
  width: 100%;
  border-color: var(--primary);
  box-shadow: 0 8px 30px var(--primary-glow);
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #0b0f19;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  width: 100%;
  transition: all 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-subtle {
  background: var(--surface-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

.btn-subtle:active:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text-main);
}

.btn-subtle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}
