/* ============================================================
   HYDRATION STATION — Main Styles
   ============================================================ */

:root {
  --deep:    #0077B6;
  --mid:     #00B4D8;
  --light:   #90E0EF;
  --pale:    #CAF0F8;
  --accent:  #48CAE4;
  --white:   #FFFFFF;
  --text:    #023E8A;
  --shadow:  rgba(0, 119, 182, 0.18);
}

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

html, body {
  min-height: 100%;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(160deg, #caf0f8 0%, #ade8f4 50%, #90e0ef 100%);
  color: var(--text);
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ============================================================
   BUBBLES BACKGROUND
   ============================================================ */

#bubbles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7), rgba(144,224,239,0.25));
  border: 1.5px solid rgba(255,255,255,0.5);
  animation: rise linear infinite;
  opacity: 0;
}

@keyframes rise {
  0%   { transform: translateY(0) scale(1);    opacity: 0; }
  10%  { opacity: 0.7; }
  80%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) scale(1.1); opacity: 0; }
}

/* ============================================================
   PASSCODE SCREEN
   ============================================================ */

#passcode-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.passcode-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  text-align: center;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 40px var(--shadow);
  animation: floatIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes floatIn {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1);       opacity: 1; }
}

.passcode-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s ease-in-out infinite;
}

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

.passcode-title {
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  color: var(--deep);
  margin-bottom: 0.4rem;
}

.passcode-subtitle {
  font-size: 0.95rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.passcode-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.passcode-digit {
  width: 56px;
  height: 64px;
  border-radius: 16px;
  border: 2.5px solid var(--light);
  background: rgba(255,255,255,0.8);
  text-align: center;
  font-size: 1.5rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  color: var(--deep);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  -webkit-text-security: disc;
}

.passcode-digit:focus {
  border-color: var(--mid);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.2);
  transform: scale(1.06);
}

.passcode-digit.filled {
  border-color: var(--accent);
  background: rgba(72, 202, 228, 0.1);
}

.passcode-digit.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.passcode-error {
  color: #e63946;
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.2s;
}

.passcode-error.visible {
  opacity: 1;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

#main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 4rem;
  gap: 2rem;
}

/* Header */
.main-header {
  text-align: center;
  padding-top: 1rem;
}

.main-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--deep);
  text-shadow: 0 2px 12px rgba(0,119,182,0.15);
}

.main-subtitle {
  font-size: 1.05rem;
  color: var(--mid);
  font-weight: 700;
  margin-top: 0.4rem;
}

/* Water bottle */
.water-bottle-section {
  display: flex;
  justify-content: center;
}

.bottle-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(180deg);
}

.bottle-cap {
  width: 32px;
  height: 14px;
  background: linear-gradient(180deg, var(--accent), var(--deep));
  border-radius: 6px 6px 0 0;
  box-shadow: 0 2px 6px rgba(0,100,150,0.2);
}

.bottle {
  width: 80px;
  height: 180px;
  border-radius: 12px 12px 20px 20px;
  border: 3px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.2);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,119,182,0.2), inset 0 0 20px rgba(255,255,255,0.3);
}

.bottle-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(0deg, color-mix(in srgb, var(--accent) 70%, transparent), color-mix(in srgb, var(--mid) 90%, transparent));
  transition: height 3s cubic-bezier(0.15, 0.6, 0.35, 1);
  border-radius: 16px 16px 0 0;
}

.bottle-fill::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 12px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: waveFill 2s ease-in-out infinite;
}

@keyframes waveFill {
  0%, 100% { transform: scaleX(1) translateY(0); }
  50%       { transform: scaleX(1.05) translateY(2px); }
}

.bottle-shine {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 10px;
  height: 60px;
  background: rgba(255,255,255,0.45);
  border-radius: 10px;
  transform: rotate(-8deg);
}

/* Streak card */
.streak-section {
  width: 100%;
  max-width: 320px;
}

.streak-card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.streak-emoji {
  font-size: 2.2rem;
}

.streak-number {
  font-family: 'Pacifico', cursive;
  font-size: 2.2rem;
  color: var(--deep);
  line-height: 1;
}

.streak-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* CTA button */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-prompt {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep);
}

.drink-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, var(--mid), var(--deep));
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,119,182,0.35), 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

.drink-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
  border-radius: inherit;
}

.drink-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 32px rgba(0,119,182,0.45);
  animation: wiggle 0.4s ease;
}

.drink-btn:active {
  transform: scale(0.97);
}

@keyframes wiggle {
  0%, 100% { transform: scale(1.04) rotate(0deg); }
  25%       { transform: scale(1.04) rotate(-3deg); }
  75%       { transform: scale(1.04) rotate(3deg); }
}

.drink-btn-icon {
  font-size: 1.3rem;
}

.limit-message {
  margin-top: 0.75rem;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(0,180,216,0.3);
  border-radius: 16px;
  padding: 0.75rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--deep);
  text-align: center;
  max-width: 320px;
  animation: floatIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   OVERLAYS (shared base)
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 62, 138, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   CONFIRM MODAL
   ============================================================ */

.modal-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.95);
  border-radius: 28px;
  padding: 2.2rem 1.8rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 50px rgba(0,119,182,0.2);
  animation: splash 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes splash {
  0%   { transform: scale(0.5); opacity: 0; }
  80%  { transform: scale(1.05); }
  100% { transform: scale(1);   opacity: 1; }
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: 'Pacifico', cursive;
  font-size: 1.8rem;
  color: var(--deep);
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--mid), var(--deep));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,119,182,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,119,182,0.4);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: rgba(144,224,239,0.35);
  color: var(--deep);
  border: 2px solid var(--light);
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-secondary:hover {
  background: rgba(144,224,239,0.6);
  transform: scale(1.04);
}

/* ============================================================
   REVEAL OVERLAY
   ============================================================ */

.reveal-card {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.95);
  border-radius: 28px;
  padding: 2rem 1.8rem 2.2rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 14px 60px rgba(0,119,182,0.22);
  animation: splash 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--deep);
  margin-bottom: 0.4rem;
}

.reveal-subtitle {
  font-size: 0.95rem;
  color: var(--mid);
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.reveal-photo-wrap {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  min-height: 180px;
  background: linear-gradient(135deg, var(--pale), var(--light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-photo {
  width: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: block;
}

.reveal-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: var(--deep);
}

.reveal-placeholder span {
  font-size: 3rem;
}

.reveal-placeholder p {
  font-weight: 700;
  font-size: 1rem;
}

.reveal-placeholder small {
  font-size: 0.8rem;
  color: var(--mid);
}

.btn-close {
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--accent), var(--mid));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,180,216,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-close:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,180,216,0.4);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */

@media (max-width: 400px) {
  .passcode-digit {
    width: 48px;
    height: 56px;
    font-size: 1.3rem;
  }

  .drink-btn {
    font-size: 1rem;
    padding: 0.9rem 1.8rem;
  }
}
