/* ==========================================================================
   LEVVI PWA — PAGES CSS
   Splash, Home Hero, Timeline, Water Tracker, Treinos, Timer, Check-in, Chat, etc.
   ========================================================================== */

/* 1. SPLASH SCREEN (index.html) */
.splash-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2xl) var(--space-xl);
  background: linear-gradient(165deg, #1A1C1A 0%, #202320 60%, #151815 100%);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.splash-glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(80, 141, 63, 0.35) 0%, rgba(80, 141, 63, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
}

.splash-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: auto;
}

.splash-logo-circle {
  width: 96px;
  height: 96px;
  background: #FFFFFF;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(80, 141, 63, 0.2);
  margin-bottom: var(--space-xl);
  animation: pulseSoft 2.4s infinite ease-in-out;
}

.splash-logo-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--color-primary);
}

.splash-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
  color: #FFFFFF;
}

.splash-tagline {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  max-width: 260px;
  line-height: 1.5;
}

.splash-footer {
  width: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

.splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-sm);
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: 0 24px 48px rgba(80, 141, 63, 0.4); }
}

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

/* 2. TELA MEU DIA (home.html) */
.home-hero {
  background: linear-gradient(170deg, #1C1F1C 0%, #202320 65%, #272B27 100%);
  color: #FFFFFF;
  padding: calc(env(safe-area-inset-top, 20px) + 16px) var(--space-lg) var(--space-xl);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.avatar-ring {
  position: relative;
  cursor: pointer;
}

.avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #E8F5E9;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--color-primary);
}

.adaptive-switcher {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px;
  display: inline-flex;
  gap: 2px;
  margin-bottom: var(--space-md);
}

.adaptive-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.adaptive-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.day-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.day-carousel::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: 0 0 calc(14.28% - 7px);
  min-width: 46px;
  padding: 10px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.day-chip.active {
  background: #FFFFFF;
  color: var(--color-dark);
  font-weight: 700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  margin: 4px auto 0;
}

.progress-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: var(--space-md);
}

.water-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
}

.timeline-card {
  transition: var(--transition);
}

/* 3. TELA DE EXECUÇÃO DE EXERCÍCIO & CRONÔMETRO (exercicio.html) */
.timer-box {
  background: #202320;
  color: #FFFFFF;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.timer-display {
  font-size: 3rem;
  font-weight: 800;
  font-family: monospace;
  color: #8FD87B;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.set-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-background);
  color: var(--color-text-main);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.set-input {
  width: 64px;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}

/* 4. CALENDÁRIO DE FREQUÊNCIA (historico-treinos.html) */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  margin-top: 10px;
}

.cal-day-header {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.cal-day-cell {
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-background);
  position: relative;
}

.cal-day-cell.trained {
  background: rgba(80, 141, 63, 0.15);
  color: var(--color-primary);
  font-weight: 800;
}

.cal-day-cell.today {
  border: 2px solid var(--color-primary);
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 2px;
}

/* 5. CHAT (chat.html) */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-background);
}

.chat-header {
  background: #FFFFFF;
  padding: calc(env(safe-area-inset-top, 20px) + 8px) 16px 12px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--color-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: #FFFFFF;
  color: var(--color-text-main);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chat-time {
  font-size: 0.6875rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.chat-footer {
  background: #FFFFFF;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 12px) + 10px);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 6. CHECK-IN RATINGS (checkin.html) */
.rating-bar {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin: 10px 0;
}

.rating-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.rating-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

/* 7. AGENDAMENTO SLOTS (agendar.html) */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.slot-btn {
  padding: 8px 4px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.slot-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}
