/* ═══════════════════════════════════════════════════
   SUMAIYA'S LEARNING WORLD — MAIN STYLES
   Variables · Reset · Base · Header · Streak · Utilities
═══════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────── */
:root {
  --pink:        #FF8FAB;
  --pink-light:  #FFDDE8;
  --pink-soft:   #FFF0F5;
  --blue:        #72B6F7;
  --blue-light:  #DBF0FF;
  --blue-soft:   #F0F8FF;
  --yellow:      #FFD166;
  --yellow-light:#FFF4CC;
  --yellow-soft: #FFFBF0;
  --purple:      #C39BF5;
  --purple-light:#EEE0FF;
  --purple-soft: #F9F4FF;
  --green:       #6DD99A;
  --green-light: #D4F5E4;
  --mint:        #7FE0CE;
  --coral:       #FF9A7B;
  --white:       #FFFFFF;
  --card-bg:     #FFFFFF;
  --page-bg:     #FEF8FF;
  --text-dark:   #3D2B5E;
  --text-mid:    #6B5A82;
  --text-light:  #9C88B0;
  --shadow-soft: 0 8px 32px rgba(120, 80, 180, 0.10);
  --shadow-card: 0 4px 24px rgba(120, 80, 180, 0.12);
  --shadow-hover: 0 12px 40px rgba(120, 80, 180, 0.20);
  --shadow-md:   0 6px 20px rgba(120, 80, 180, 0.15);
  --radius:      24px;
  --radius-sm:   14px;
  --radius-md:   18px;
  --radius-lg:   24px;
  --font-main:   'Baloo 2', 'Nunito', sans-serif;
  --font-body:   'Nunito', sans-serif;
  --bg-color:    #FEF8FF;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── CUTE LOGIN SCREEN STYLES ────────────────────────── */

/* Pastel gradient background */
#login-screen {
  background: linear-gradient(135deg, #FFD6E8 0%, #E8D5F7 25%, #D4E5FF 50%, #FFF4D6 75%, #FFE8D6 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating decorative shapes */
.login-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-shapes .shape {
  position: absolute;
  font-size: 2rem;
  opacity: 0.4;
  animation: float 6s ease-in-out infinite;
}

.shape-1 { top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { top: 20%; right: 15%; animation-delay: 1s; }
.shape-3 { top: 60%; left: 5%; animation-delay: 2s; }
.shape-4 { bottom: 20%; right: 10%; animation-delay: 3s; }
.shape-5 { top: 40%; right: 5%; animation-delay: 4s; }
.shape-6 { bottom: 30%; left: 15%; animation-delay: 5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Login wrapper */
.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Secret Zone Badge */
.secret-badge {
  background: linear-gradient(135deg, #FFF5D6 0%, #FFE4B5 100%);
  border: 2px solid #FFD93D;
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #B8860B;
  box-shadow: 0 4px 15px rgba(255, 217, 61, 0.3);
  animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Main Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 40px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 0 0 4px rgba(255, 255, 255, 0.5),
    inset 0 0 60px rgba(255, 214, 232, 0.3);
  text-align: center;
  max-width: 420px;
  width: 100%;
  backdrop-filter: blur(10px);
  animation: cardFadeIn 0.8s ease-out;
}

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

/* Avatar Section */
.login-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.avatar-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  top: -10px;
  left: -10px;
  background: radial-gradient(circle, rgba(255, 214, 232, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #FFD6E8 0%, #E8D5F7 100%);
}

.avatar-circle .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-shine {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
  z-index: 3;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}

/* Title */
.login-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #6B5B73;
  margin-bottom: 16px;
  font-family: var(--font-main);
}

.title-bloom {
  display: inline-block;
  animation: bloom 3s ease-in-out infinite;
}

@keyframes bloom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Message Card */
.message-card {
  background: linear-gradient(135deg, #FFF9F0 0%, #FFF5E6 100%);
  border: 2px solid #FFE4C4;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.message-text {
  font-size: 1rem;
  color: #8B7355;
  line-height: 1.6;
  margin-bottom: 8px;
}

.message-warning {
  font-size: 0.95rem;
  color: #CD853F;
  font-weight: 600;
  font-style: italic;
}

.message-decor {
  font-size: 0.8rem;
  color: #DEB887;
  letter-spacing: 4px;
  margin-top: 8px;
}

/* No Entry Badge */
.no-entry-badge {
  background: linear-gradient(135deg, #FFE8E8 0%, #FFD6D6 100%);
  border: 2px dashed #FFB6B6;
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.no-entry-icon {
  font-size: 1.2rem;
}

.no-entry-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #C65D57;
}

/* Login Form */
.login-form {
  text-align: left;
}

.login-form .input-group {
  margin-bottom: 16px;
}

.login-form .input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8B7B8B;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-icon {
  font-size: 1rem;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E8E0E8;
  border-radius: 14px;
  font-size: 1rem;
  background: #FDFBFD;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.login-form input:focus {
  outline: none;
  border-color: #D4A5D4;
  background: white;
  box-shadow: 0 0 0 4px rgba(212, 165, 212, 0.15);
}

.login-form input::placeholder {
  color: #C0B0C0;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #D4A5D4 0%, #B8D4E8 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 8px;
  box-shadow: 0 4px 15px rgba(212, 165, 212, 0.4);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 212, 0.5);
}

.login-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.1rem;
}

/* Login Error */
.login-error {
  color: #E57373;
  font-size: 0.9rem;
  margin-top: 12px;
  min-height: 20px;
  font-weight: 500;
}

/* Login Footer */
.login-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed #E8E0E8;
}

.login-footer p {
  font-size: 0.85rem;
  color: #A090A0;
  font-weight: 500;
}

/* ─── SCREEN MANAGEMENT ──────────────────────────── */
.screen {
  width: 100%;
  min-height: 100vh;
}

#home-screen, #write-screen, #view-screen {
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* ─── PAGE WRAPPER ───────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: linear-gradient(180deg, #FFFBF5 0%, #FFF 100%);
  border-radius: 20px;
}

/* Floating decorative shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: #FFD6E8;
  top: 10%;
  left: -100px;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: #E8D5F7;
  top: 50%;
  right: -50px;
  animation-delay: 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: #FFE4B5;
  bottom: 20%;
  left: 10%;
  animation-delay: 4s;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(10deg); }
}

/* ─── REVEAL ANIMATION ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: revealUp .65s cubic-bezier(.22,.68,0,1.2) forwards;
  animation-delay: var(--delay, 0s);
  padding-top: 8px;
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SECTION TITLE ──────────────────────────────── */
.section-title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -.3px;
  padding-top: 8px;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #FF6B9D, #D4A5D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #FFD93D, #FF6B9D, #D4A5D4);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════
   1. HEADER
═══════════════════════════════════════════════════ */
.header-card {
  background: linear-gradient(135deg, #FFE8F0 0%, #FFF0E8 50%, #E8F4FF 100%);
  border: 4px solid #FFD6E8;
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 8px 30px rgba(255, 214, 232, 0.4), inset 0 1px 0 rgba(255,255,255,.7);
  position: relative;
  overflow: hidden;
}

.header-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.45) 0%, transparent 70%);
  border-radius: 50%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Avatar */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 6px 20px rgba(200,100,160,.25), 0 0 0 4px #fff, 0 0 0 8px rgba(255,143,171,.3);
  animation: avatarPulse 3s ease-in-out infinite;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes avatarPulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.avatar-badge {
  position: absolute;
  bottom: 0; right: 0;
  background: linear-gradient(135deg, #FFD93D, #FFA62B);
  border: 3px solid #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes badgeBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Header text */
.header-text { display: flex; flex-direction: column; gap: 2px; }

.greeting {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: .3px;
}

.username {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.8);
  letter-spacing: -1px;
}

.name-bloom {
  display: inline-block;
  animation: bloom 3s ease-in-out infinite;
}

@keyframes bloom {
  0%,100% { transform: rotate(-10deg) scale(1); }
  50%      { transform: rotate(10deg) scale(1.2); }
}

.tagline {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-mid);
}

.next-event {
  font-size: 0.85rem;
  font-weight: 700;
  color: #D4A5D4;
  margin-top: 4px;
  background: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
}

/* Header right */
.header-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.header-stat {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  min-width: 110px;
}

.stat-icon { font-size: 1.3rem; }
.stat-value { font-family: var(--font-main); font-size: 1.5rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.stat-label { font-size: .75rem; font-weight: 700; color: var(--text-mid); }

.btn-logout-sm {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-logout-sm:hover {
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════
   2. FAMILY EVENTS LIST
═══════════════════════════════════════════════════ */
.family-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-event-card {
  background: linear-gradient(135deg, #FFF, #F8F0FF);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid #D4A5D4;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.family-event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.family-event-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #FF8FAB, #C39BF5);
}

.event-person-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.1));
  animation: eventPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes eventPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.event-details {
  flex: 1;
  min-width: 0;
}

.event-person-name {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.event-type {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
}

.event-countdown-box {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

.event-days-left {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--pink);
  line-height: 1;
}

.event-days-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-date-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  text-align: center;
  margin-top: 4px;
}

/* Today highlight */
.family-event-card.today {
  background: linear-gradient(135deg, #FFE8F0, #FFD0E8);
  border-left-color: #FF6B9D;
  animation: todayGlow 2s ease-in-out infinite;
}

@keyframes todayGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 100, 150, 0.2); }
  50% { box-shadow: 0 4px 25px rgba(255, 100, 150, 0.4); }
}

.family-event-card.today .event-days-left {
  color: #E91E63;
  font-size: 1rem;
}

/* Events Expand/Collapse Button */
.events-toggle-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--purple-soft), var(--pink-soft));
  border: 2px dashed var(--purple-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.events-toggle-btn:hover {
  background: linear-gradient(135deg, var(--purple-light), var(--pink-light));
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(195, 155, 245, 0.3);
}

.events-toggle-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   3. STREAK SECTION
═══════════════════════════════════════════════════ */
.streak-card {
  background: linear-gradient(135deg, #FFF9E6, #FFE8CC);
  border: 3px solid #FFD93D;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.streak-flame-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flame-icon {
  font-size: 3.5rem;
  animation: flicker 0.5s infinite alternate;
  filter: drop-shadow(0 4px 8px rgba(255, 140, 0, .4));
}

@keyframes flicker {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.streak-count {
  font-family: var(--font-main);
  font-size: 3rem;
  font-weight: 900;
  color: #FF6B35;
  line-height: 1;
}
.streak-desc { font-size: .9rem; font-weight: 700; color: var(--text-mid); text-align: center; }

.streak-divider {
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #E8D5FF, transparent);
  margin: 0 24px;
  border-radius: 2px;
}

.stars-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stars-count {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-dark);
}
.stars-desc { font-size: .85rem; font-weight: 700; color: var(--text-mid); }
.star-row { display: flex; gap: 4px; margin-top: 4px; }
.star { font-size: 1.2rem; }
.star.filled { animation: starTwinkle 2s ease-in-out infinite; }
.star.filled:nth-child(1) { animation-delay: 0s; }
.star.filled:nth-child(2) { animation-delay: .2s; }
.star.filled:nth-child(3) { animation-delay: .4s; }
.star.filled:nth-child(4) { animation-delay: .6s; }
.star.filled:nth-child(5) { animation-delay: .8s; }
.star.dim { opacity: .3; }
@keyframes starTwinkle {
  0%,100% { transform: scale(1); filter: brightness(1); }
  50%      { transform: scale(1.25); filter: brightness(1.3); }
}

.progress-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 24px;
  border-left: 2px solid #F0E8FF;
}
.progress-label { font-size: .85rem; font-weight: 700; color: var(--text-mid); }
.progress-track {
  background: var(--purple-light);
  border-radius: 30px;
  height: 14px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), #ff8fab);
  border-radius: 30px;
  position: relative;
  animation: growBar 1s cubic-bezier(.22,.68,0,1.2) forwards;
  animation-delay: .5s;
  transform-origin: left;
  transform: scaleX(0);
}
@keyframes growBar {
  to { transform: scaleX(1); }
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 14px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  animation: progressGlow 1.5s ease-in-out infinite;
}
@keyframes progressGlow {
  0%,100% { opacity: .5; }
  50%      { opacity: 1; }
}
.progress-emoji-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════ */

/* Buttons */
.btn-secondary {
  background: #f0f0f0;
  color: #555;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Error Message */
.error {
  color: #e74c3c;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--pink-soft); }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 8px; }

/* Selection */
::selection { background: var(--pink-light); color: var(--text-dark); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — DESKTOP
═══════════════════════════════════════════════════ */
@media (min-width: 1200px) {
  .page-wrapper {
    max-width: 1100px;
    gap: 40px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .page-wrapper { padding: 18px 14px 50px; gap: 24px; }

  /* Header */
  .header-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .header-right { flex-direction: row; align-self: stretch; justify-content: space-between; }
  .header-stat { flex: 1; justify-content: center; }
  .username { font-size: 1.8rem; }

  /* Streak */
  .streak-card { flex-direction: column; gap: 16px; }
  .streak-divider { width: 80%; height: 2px; margin: 0 auto; }
  .progress-area { border-left: none; border-top: 2px solid #F0E8FF; padding-left: 0; padding-top: 16px; width: 100%; }

  /* Family Events */
  .family-event-card { flex-wrap: wrap; padding: 14px 16px; }
  .event-person-emoji { font-size: 2rem; }
  .event-person-name { font-size: 1.1rem; }
  .event-countdown-box { min-width: 60px; padding: 8px 12px; }
  .event-days-left { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .header-left { flex-direction: column; align-items: flex-start; }
  .header-right { flex-direction: column; }
  .username { font-size: 1.6rem; }
  .section-title { font-size: 1.25rem; }

  /* Cute Login Mobile */
  .login-card {
    padding: 28px 24px;
    border-radius: 24px;
  }

  .login-title {
    font-size: 1.3rem;
  }

  .login-avatar {
    width: 100px;
    height: 100px;
  }

  .avatar-circle {
    width: 100px;
    height: 100px;
  }

  .avatar-glow {
    width: 120px;
    height: 120px;
    top: -10px;
    left: -10px;
  }

  .message-card {
    padding: 16px;
  }

  .message-text {
    font-size: 0.9rem;
  }

  .secret-badge {
    font-size: 0.8rem;
    padding: 8px 18px;
  }

  .no-entry-badge {
    padding: 10px 16px;
  }

  .no-entry-text {
    font-size: 0.75rem;
  }

  .login-form input {
    padding: 12px 14px;
  }

  .login-btn {
    padding: 14px;
    font-size: 0.95rem;
  }
}
