@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

:root {
  --sun: #FFB830;
  --coral: #FF6B6B;
  --mint: #4ECDC4;
  --sky: #45B7D1;
  --lavender: #A78BFA;
  --lime: #84CC16;
  --peach: #FFA07A;
  --bg: #FFF9F0;
  --surface: #FFFFFF;
  --surface2: #FFF3E0;
  --text: #2D2D2D;
  --text-muted: #8B7E74;
  --border: #F0E6D3;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.14);
  --nav-h: 64px;
}

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

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

h1, h2, h3 {
  font-family: 'Fredoka One', cursive;
  letter-spacing: 0.3px;
}

/* ─── SCROLLBAR ──────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ─── BOTTOM NAV ─────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.nav-item .icon { font-size: 22px; transition: transform .2s; }
.nav-item:hover .icon { transform: scale(1.2); }
.nav-item.active { color: var(--coral); }
.nav-item.active .icon { transform: scale(1.15); }

/* ─── PAGE WRAPPER ───────────────── */
.page {
  display: none;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 24px);
}
.page.active { display: block; }

.page-header {
  padding: 20px 20px 12px;
  position: sticky; top: 0;
  background: var(--bg);
  z-index: 50;
  border-bottom: 2px solid var(--border);
}
.page-header h1 { font-size: 26px; }
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 2px; }

.page-content { padding: 16px 20px; }

/* ─── CARDS ──────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card-accent-sun { border-left: 5px solid var(--sun); }
.card-accent-coral { border-left: 5px solid var(--coral); }
.card-accent-mint { border-left: 5px solid var(--mint); }
.card-accent-sky { border-left: 5px solid var(--sky); }
.card-accent-lavender { border-left: 5px solid var(--lavender); }

/* ─── BUTTONS ────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 14px;
  transition: all .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--coral); color: white; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 2px solid var(--border); }
.btn-mint { background: var(--mint); color: white; }
.btn-sun { background: var(--sun); color: white; }
.btn-lavender { background: var(--lavender); color: white; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── INPUTS ─────────────────────── */
input, textarea, select {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  width: 100%;
  transition: border-color .2s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--coral);
}
label {
  font-size: 13px; font-weight: 800;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group { margin-bottom: 14px; }

/* ─── AVATAR ─────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 80px; height: 80px; }

/* ─── BADGE ──────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px; font-weight: 800;
}
.badge-wfo { background: #DCFCE7; color: #16A34A; }
.badge-wfc { background: #FEF9C3; color: #CA8A04; }
.badge-wfh { background: #DBEAFE; color: #2563EB; }
.badge-none { background: var(--surface2); color: var(--text-muted); }

/* ─── MOOD GRID ──────────────────── */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 10px 0;
}
.mood-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  font-size: 12px; font-weight: 700;
  background: var(--surface);
}
.mood-option:hover { border-color: var(--coral); transform: scale(1.05); }
.mood-option.selected { border-color: var(--coral); background: #FFF0F0; }
.mood-option .mood-emoji { font-size: 28px; }

/* ─── TOGGLE ─────────────────────── */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.toggle {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 99px;
  position: relative; cursor: pointer;
  transition: background .2s;
  border: none;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle.on { background: var(--mint); }
.toggle.on::after { left: 23px; }

/* ─── SECTION TITLE ──────────────── */
.section-title {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 20px 0 10px;
}

/* ─── REACTIONS ──────────────────── */
.reactions-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.reaction-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer; font-size: 14px;
  transition: all .15s;
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700;
}
.reaction-btn:hover { border-color: var(--sun); background: var(--surface2); }
.reaction-btn.mine { border-color: var(--sun); background: #FFF8E1; }

/* ─── EMPTY STATE ────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; font-weight: 600; }

/* ─── LOGIN PAGE ─────────────────── */
#page-login {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #FFF9F0 0%, #FFE8CC 50%, #FFD6B8 100%);
  padding: 40px 24px;
  text-align: center;
}
#page-login .logo { font-size: 80px; margin-bottom: 16px; animation: bounce 2s infinite; }
#page-login h1 { font-size: 36px; color: var(--coral); margin-bottom: 8px; }
#page-login p { color: var(--text-muted); font-size: 16px; margin-bottom: 40px; max-width: 280px; }
.google-btn {
  display: flex; align-items: center; gap: 12px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 99px;
  padding: 14px 28px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 16px;
  color: var(--text);
  transition: all .2s;
  box-shadow: var(--shadow);
}
.google-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.google-btn img { width: 24px; }

/* ─── TOAST ──────────────────────── */
#toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: white;
  padding: 12px 24px; border-radius: 99px;
  font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: all .3s; z-index: 999;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── MODAL ──────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 24px 40px;
  width: 100%; max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 0 auto 20px;
}
.modal h2 { margin-bottom: 16px; font-size: 22px; }

/* ─── AGENDA ITEM ────────────────── */
.agenda-item {
  display: flex; gap: 14px;
  align-items: flex-start;
}
.agenda-date-box {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  font-weight: 900;
}
.agenda-date-box .day { font-size: 22px; line-height: 1; font-family: 'Fredoka One', cursive; }
.agenda-date-box .month { font-size: 10px; text-transform: uppercase; font-weight: 800; }

/* ─── PERSON CARD ────────────────── */
.person-card {
  display: flex; align-items: center; gap: 14px;
}
.person-card .person-info { flex: 1; min-width: 0; }
.person-card .person-name {
  font-size: 16px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.person-card .person-role {
  font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 2px;
}

/* ─── ANIMATIONS ─────────────────── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease both; }

/* ─── PROFILE SETUP ──────────────── */
.profile-banner {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  padding: 30px 20px;
  text-align: center;
  color: white;
}
.profile-banner h2 { font-size: 20px; margin-top: 12px; }
.profile-banner p { font-size: 14px; opacity: 0.85; margin-top: 4px; }

/* ─── MOOD BOARD ─────────────────── */
.mood-board-item {
  display: flex; align-items: flex-start; gap: 12px;
}
.mood-board-item .mood-big { font-size: 36px; flex-shrink: 0; }
.mood-board-item .mood-info { flex: 1; }
.mood-board-item .mood-name { font-weight: 800; font-size: 15px; }
.mood-board-item .mood-note { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ─── SHOUTOUT ───────────────────── */
.shoutout-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.shoutout-arrow {
  font-size: 20px;
  color: var(--sun);
  margin: 0 4px;
}
.shoutout-msg {
  font-size: 15px;
  line-height: 1.5;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-style: italic;
}

/* ─── RESPONSIVE ─────────────────── */
@media (min-width: 500px) {
  .bottom-nav { max-width: 500px; left: 50%; transform: translateX(-50%); }
  .page-content { max-width: 500px; margin: 0 auto; }
  .page-header { max-width: 500px; margin: 0 auto; }
}

/* ─── LOADING ────────────────────── */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 999;
}
#loading-screen .spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
