/* ===============================
   BRIGHTSIDE — FULL CSS
   =============================== */

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

:root {
  --primary: #6C63FF;
  --secondary: #FF6584;
  --accent: #FFD166;
  --green: #06D6A0;
  --bg: #0F0E1A;
  --bg2: #1A1830;
  --bg3: #231F3A;
  --text: #F0EDFF;
  --muted: #9D97C2;
  --card: #1E1B35;
  --card-border: rgba(108,99,255,0.25);
  --radius: 18px;
  --shadow: 0 8px 32px rgba(108,99,255,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ======= NAVBAR ======= */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(15,14,26,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.logo {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 1px;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.points-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; padding: 6px 18px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 2px 12px rgba(108,99,255,0.4);
  transition: transform 0.2s;
}
.points-badge:hover { transform: scale(1.05); }

/* ======= HERO ======= */
.hero {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.18) 0%, transparent 70%);
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-content h1 {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero-content p {
  font-size: 1.15rem; color: var(--muted); margin-bottom: 32px; line-height: 1.7;
}
.hero-name-box { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-name-box input {
  padding: 12px 20px; border-radius: 50px; border: 2px solid var(--card-border);
  background: var(--card); color: var(--text); font-size: 1rem; font-family: 'Nunito', sans-serif;
  outline: none; width: 220px; transition: border-color 0.2s;
}
.hero-name-box input:focus { border-color: var(--primary); }
.hero-name-box button {
  padding: 12px 28px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Nunito', sans-serif;
}
.hero-name-box button:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(108,99,255,0.5); }
.welcome-msg { margin-top: 18px; font-size: 1.1rem; color: var(--green); font-weight: 700; min-height: 28px; }

/* Floating emojis */
.floating-emojis { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.floating-emojis span {
  position: absolute; font-size: 2rem; opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.floating-emojis span:nth-child(1) { left: 8%; top: 20%; animation-delay: 0s; }
.floating-emojis span:nth-child(2) { left: 85%; top: 15%; animation-delay: 1.2s; }
.floating-emojis span:nth-child(3) { left: 12%; top: 70%; animation-delay: 2.4s; }
.floating-emojis span:nth-child(4) { left: 75%; top: 65%; animation-delay: 0.8s; }
.floating-emojis span:nth-child(5) { left: 50%; top: 10%; animation-delay: 1.8s; }
.floating-emojis span:nth-child(6) { left: 90%; top: 50%; animation-delay: 3s; }
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-24px) rotate(12deg); }
}

/* ======= DASHBOARD ======= */
.dashboard {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center; padding: 32px 24px;
  background: var(--bg2);
}
.dashboard-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px 32px;
  display: flex; align-items: center; gap: 16px;
  min-width: 180px; box-shadow: var(--shadow);
  cursor: default; transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(108,99,255,0.25); }
.share-card { cursor: pointer; background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(255,101,132,0.2)); }
.dash-icon { font-size: 2rem; }
.dash-value { font-size: 1.7rem; font-weight: 900; color: var(--text); }
.dash-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* ======= SECTIONS ======= */
.section { padding: 64px 24px; max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 36px; font-size: 1rem; }

/* ======= TASKS ======= */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.task-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s;
  position: relative; overflow: hidden;
}
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.task-card.completed {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(6,214,160,0.08), var(--card));
}
.task-card.completed::after {
  content: '✅ Done!';
  position: absolute; top: 12px; right: 14px;
  font-size: 0.75rem; font-weight: 700; color: var(--green);
}
.task-emoji { font-size: 2.4rem; }
.task-title { font-size: 1.05rem; font-weight: 700; }
.task-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.task-points {
  background: rgba(255,209,102,0.12); color: var(--accent);
  border-radius: 50px; padding: 4px 14px; font-size: 0.8rem; font-weight: 700;
  width: fit-content;
}
.task-btn {
  margin-top: auto; padding: 10px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: transform 0.15s, opacity 0.2s;
}
.task-btn:hover:not(:disabled) { transform: scale(1.04); }
.task-btn:disabled { opacity: 0.4; cursor: not-allowed; background: var(--bg3); }

/* ======= SONGS ======= */
.songs-section { background: var(--bg2); max-width: 100%; padding: 64px 40px; }
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; max-width: 1100px; margin: 0 auto;
}
.song-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.song-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.song-thumb {
  width: 100%; height: 170px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
  position: relative; overflow: hidden;
}
.song-thumb-emoji { font-size: 3.5rem; }
.song-info { padding: 16px 18px; }
.song-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.song-artist { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.song-actions { display: flex; gap: 8px; align-items: center; }
.song-play-btn {
  flex: 1; padding: 9px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 700; font-size: 0.88rem; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: transform 0.15s;
}
.song-play-btn:hover { transform: scale(1.04); }
.song-pts-btn {
  padding: 9px 14px; border-radius: 50px; border: 1px solid var(--card-border);
  background: transparent; color: var(--accent); font-weight: 700; font-size: 0.8rem;
  cursor: pointer; font-family: 'Nunito', sans-serif; transition: background 0.2s;
  white-space: nowrap;
}
.song-pts-btn:hover { background: rgba(255,209,102,0.12); }

/* ======= JOKES ======= */
.jokes-section { background: var(--bg); }
.joke-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 40px; text-align: center;
  max-width: 700px; margin: 0 auto; box-shadow: var(--shadow);
}
.joke-text { font-size: 1.2rem; line-height: 1.7; color: var(--text); margin-bottom: 28px; min-height: 80px; }
.joke-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ======= AFFIRMATIONS ======= */
.affirmations-section { background: var(--bg2); max-width: 100%; padding: 64px 40px; }
.affirmation-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.15), rgba(6,214,160,0.08));
  border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 48px 40px; text-align: center;
  max-width: 720px; margin: 0 auto 28px;
}
.affirmation-text {
  font-size: 1.5rem; font-weight: 700; line-height: 1.6; color: var(--text);
  margin-bottom: 28px; min-height: 90px;
  font-family: 'Pacifico', cursive;
}
.affirmation-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.affirmation-tabs {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.tab-btn {
  padding: 8px 20px; border-radius: 50px; border: 1px solid var(--card-border);
  background: transparent; color: var(--muted); font-weight: 700; font-size: 0.88rem;
  cursor: pointer; font-family: 'Nunito', sans-serif; transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ======= BUTTONS ======= */
.btn-primary {
  padding: 12px 28px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(108,99,255,0.4); }
.btn-secondary {
  padding: 12px 28px; border-radius: 50px; border: 2px solid var(--green);
  background: transparent; color: var(--green); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: 'Nunito', sans-serif; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--green); color: var(--bg); }

/* ======= TOAST ======= */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; padding: 14px 28px; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 8px 32px rgba(108,99,255,0.4);
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ======= MODAL ======= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: calc(var(--radius)*1.5); padding: 40px;
  max-width: 480px; width: 90%; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.9); transition: transform 0.3s;
}
.modal-overlay.show .modal { transform: scale(1); }
.modal h2 { font-size: 1.6rem; margin-bottom: 24px; text-align: center; }
.modal-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: var(--muted);
  font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.share-card-preview {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 24px;
  color: #fff;
}
.share-card-preview h3 { font-size: 1.1rem; margin-bottom: 8px; }
.share-card-preview .big-pts { font-size: 3rem; font-weight: 900; font-family: 'Pacifico', cursive; }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-whatsapp { padding: 12px 20px; border-radius: 50px; border: none; background: #25D366; color: #fff; font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif; font-size: 0.9rem; }
.btn-twitter { padding: 12px 20px; border-radius: 50px; border: none; background: #1DA1F2; color: #fff; font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif; font-size: 0.9rem; }
.btn-copy { padding: 12px 20px; border-radius: 50px; border: 2px solid var(--muted); background: transparent; color: var(--text); font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif; font-size: 0.9rem; }

/* ======= FOOTER ======= */
footer {
  text-align: center; padding: 40px 24px;
  color: var(--muted); font-size: 0.88rem;
  border-top: 1px solid var(--card-border);
  background: var(--bg);
}
footer a { color: var(--primary); text-decoration: none; }

/* ======= RESPONSIVE ======= */
@media (max-width: 640px) {
  .navbar { padding: 12px 16px; }
  .nav-links { display: none; }
  .section { padding: 48px 16px; }
  .songs-section, .affirmations-section { padding: 48px 16px; }
  .joke-card, .affirmation-card { padding: 28px 18px; }
}
