@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --warm-cream: #FBF7F0;
  --deep-teal: #1A3A3A;
  --soft-sage: #8FB5A1;
  --amber-glow: #E8A854;
  --warm-blush: #E8C4B0;
  --muted-clay: #C49A7C;
  --text-primary: #1A2A2A;
  --text-secondary: #5A6B6B;
  --bg-gradient: linear-gradient(165deg, #FBF7F0 0%, #F0EDE6 40%, #E6EDE9 100%);
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(143, 181, 161, 0.2);
  --shadow-soft: 0 2px 20px rgba(26, 58, 58, 0.06);
  --shadow-hover: 0 8px 32px rgba(26, 58, 58, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  background: var(--bg-gradient);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  line-height: 1.2;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--deep-teal);
  color: white;
}
.btn-primary:hover {
  background: #234d4d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--deep-teal);
  border: 1.5px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(143, 181, 161, 0.08);
  border-color: var(--soft-sage);
}

.btn-amber {
  background: var(--amber-glow);
  color: var(--deep-teal);
}
.btn-amber:hover {
  background: #d49a48;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 168, 84, 0.3);
}

.btn-sage {
  background: var(--soft-sage);
  color: white;
}
.btn-sage:hover {
  background: #7da591;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-full { width: 100%; }

/* ============ CARDS ============ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--soft-sage);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(143, 181, 161, 0.15);
}

.form-input::placeholder {
  color: #aab5b5;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* ============ ERROR/SUCCESS ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert-error {
  background: rgba(220, 53, 69, 0.08);
  color: #c0392b;
  border: 1px solid rgba(220, 53, 69, 0.15);
}

.alert-success {
  background: rgba(143, 181, 161, 0.12);
  color: var(--deep-teal);
  border: 1px solid rgba(143, 181, 161, 0.25);
}

.alert.show { display: block; }

/* ============ NAV ============ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(143, 181, 161, 0.1);
}

.nav-brand {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: var(--deep-teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--soft-sage);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--deep-teal);
  background: rgba(143, 181, 161, 0.1);
}

.nav-link.active {
  color: var(--deep-teal);
  font-weight: 600;
}

/* ============ PILLAR COLORS ============ */
.pillar-release { --pillar-color: var(--soft-sage); --pillar-bg: rgba(143, 181, 161, 0.1); }
.pillar-self_happiness { --pillar-color: var(--amber-glow); --pillar-bg: rgba(232, 168, 84, 0.1); }
.pillar-kindness { --pillar-color: var(--warm-blush); --pillar-bg: rgba(232, 196, 176, 0.15); }

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.badge-sage { background: rgba(143, 181, 161, 0.15); color: var(--soft-sage); }
.badge-amber { background: rgba(232, 168, 84, 0.15); color: #c08a3e; }
.badge-blush { background: rgba(232, 196, 176, 0.2); color: var(--muted-clay); }

/* ============ LAYOUT ============ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding-top: 100px;
  padding-bottom: 60px;
  min-height: 100vh;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

/* ============ PROGRESS BAR ============ */
.progress-bar {
  height: 6px;
  background: rgba(143, 181, 161, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ LOADING ============ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--card-border);
  border-top-color: var(--soft-sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
  }

  .nav-brand {
    font-size: 18px;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 20px;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ============ STREAK FIRE ============ */
.streak-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--deep-teal);
}

.streak-fire {
  font-size: 32px;
  animation: flicker 2s ease-in-out infinite alternate;
}

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.05) rotate(2deg); }
}
