/* ==========================================
   DESIGN TOKENS & SYSTEM VARIABLES (LIGHT)
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #0284c7;       /* Cheerful Sky Blue */
  --color-primary-hover: #0369a1;
  --color-primary-light: #e0f2fe;
  
  --color-secondary: #0d9488;     /* Friendly Emerald Teal (Safety / True) */
  --color-secondary-hover: #0f766e;
  --color-secondary-light: #ccfbf1;
  
  --color-danger: #e11d48;        /* Cheerful Warm Red (Danger / Phishing) */
  --color-danger-hover: #be123c;
  --color-danger-light: #ffe4e6;
  
  --color-accent: #f59e0b;        /* Cheerful Golden Amber (Stars, Coins, Clues) */
  --color-accent-light: #fef3c7;
  
  --color-bg-base: #f0f9ff;       /* Very Light Sky Blue */
  --color-surface: #ffffff;       /* Pure White Card */
  --color-surface-dim: #f8fafc;   /* Slate Light Grey */
  
  --color-text: #0f172a;          /* Rich Slate Dark (Text) */
  --color-text-muted: #475569;    /* Medium Slate Grey */
  --color-text-light: #94a3b8;    /* Soft Grey */
  
  --border-color: #cbd5e1;
  --border-color-light: #e2e8f0;
  
  --roundness: 16px;              /* Round 12 to 16 for family-friendly softness */
  --roundness-pill: 9999px;
  
  --shadow-sm: 0 2px 4px rgba(2, 132, 199, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 8px 16px -6px rgba(2, 132, 199, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.15);
  --shadow-success: 0 10px 20px -5px rgba(13, 148, 136, 0.2);
  --shadow-danger: 0 10px 20px -5px rgba(225, 29, 72, 0.2);
  
  --font-headline: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-label: 'Inter', sans-serif;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}


main {
  display: block;
}

html {
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-base);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.main-content {
  flex-grow: 1;
}

/* Background Organic Shapes Fixed Container */
.bg-decorations {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-decorations::before, .bg-decorations::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.bg-decorations::before {
  background-color: #bae6fd;
  top: -100px;
  right: -100px;
}

.bg-decorations::after {
  background-color: #99f6e4;
  bottom: -100px;
  left: -100px;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* ==========================================
   APP BAR & FOOTER
   ========================================== */
.app-header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--color-secondary);
}

.logo-shield {
  display: inline-block;
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 4px rgba(2, 132, 199, 0.2));
}

.score-tracker {
  font-family: var(--font-headline);
  font-weight: 800;
  color: var(--color-accent);
  background-color: var(--color-accent-light);
  padding: 8px 16px;
  border-radius: var(--roundness-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

#app-footer, .app-footer {
  margin-top: auto !important;
  padding: 32px 0;
  background-color: var(--color-surface);
  border-top: 1px solid var(--border-color-light);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* ==========================================
   BUTTONS (FAMILY STYLE)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--roundness);
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(13, 148, 136, 0.3);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-text);
}

.btn-accent:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(245, 158, 11, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

/* ==========================================
   COMMON CARDS & MODALS
   ========================================== */
.card {
  background-color: var(--color-surface);
  border-radius: var(--roundness);
  border: 1px solid var(--border-color-light);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: var(--color-surface);
  border-radius: 28px;
  max-width: 600px;
  width: 100%;
  padding: 40px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--border-color);
  animation: zoomIn var(--transition-bounce);
}

/* Confetti overlay */
.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--color-primary);
  opacity: 0.8;
  top: -10px;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
