/* ==========================================================================
   Message in a Bottle - Atmospheric Ocean & Parchment Stylesheet
   Enhanced with Cinematic Throw & Notification Center
   ========================================================================== */

:root {
  --ocean-abyss: #030a14;
  --ocean-deep: #07111f;
  --ocean-navy: #0f2644;
  --ocean-medium: #193b66;
  --ocean-teal: #0e7a8a;
  --seafoam: #38b2ac;
  --cyan-glow: #4fd1c5;
  
  --parchment-light: #fffdf5;
  --parchment-base: #f7f1e1;
  --parchment-border: #dec7a5;
  --parchment-shadow: rgba(30, 20, 10, 0.4);
  --ink-dark: #221c17;
  --ink-faded: #6d5d4d;
  
  --cork-amber: #c47b3a;
  --sand-gold: #e5b56f;
  --coral-alert: #e05656;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--ocean-abyss);
  color: #ffffff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
  user-select: none;
}

/* ==========================================================================
   Background Canvas & Celestials
   ========================================================================== */
#starsCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  z-index: 1;
  pointer-events: none;
}

.moon {
  position: absolute;
  top: 60px;
  right: 12%;
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at 35% 35%, #fffdfa, #fceec5 60%, #e6caa3);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(255, 253, 235, 0.4), 0 0 90px rgba(79, 209, 197, 0.15);
  z-index: 1;
  pointer-events: none;
  animation: moonPulse 8s ease-in-out infinite alternate;
}

@keyframes moonPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.15); }
}

#wavesCanvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 52%;
  z-index: 3;
  pointer-events: none;
}

/* Ambient Audio Toggle */
.sound-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 50;
  background: rgba(15, 38, 68, 0.7);
  border: 1px solid rgba(56, 178, 172, 0.35);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.sound-toggle:hover {
  background: rgba(14, 122, 138, 0.8);
  border-color: var(--cyan-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   IN-APP FLOATING NOTIFICATION BANNER (Enhanced)
   ========================================================================== */
.notification-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px) scale(0.92);
  width: 90%;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(15, 38, 68, 0.95), rgba(7, 17, 31, 0.98));
  border: 1.5px solid var(--cyan-glow);
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(79, 209, 197, 0.35);
  z-index: 300;
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-banner.active {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  animation: bannerGlow 3s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
  0% { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(79, 209, 197, 0.25); }
  100% { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 35px rgba(79, 209, 197, 0.55); }
}

.banner-avatar {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(56, 178, 172, 0.25);
  border: 1px solid var(--seafoam);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-body {
  flex: 1;
  min-width: 0;
}

.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.banner-sender {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--cyan-glow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.banner-text {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.banner-reply-btn {
  background: var(--seafoam);
  color: var(--ocean-abyss);
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.banner-reply-btn:hover {
  background: var(--cyan-glow);
  transform: scale(1.05);
}

.banner-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.banner-close-btn:hover {
  color: #fff;
}

/* ==========================================================================
   NOTIFICATION CENTER DROPDOWN
   ========================================================================== */
.notif-bell-container {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: rgba(15, 38, 68, 0.97);
  border: 1px solid rgba(56, 178, 172, 0.4);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  overflow: hidden;
}

.notif-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-dropdown-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-glow);
}

.clear-notifs-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
}

.clear-notifs-btn:hover {
  color: var(--coral-alert);
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.6);
  border: 1px solid rgba(56, 178, 172, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.notif-item:hover {
  background: rgba(14, 122, 138, 0.3);
  border-color: var(--cyan-glow);
}

.notif-item-avatar {
  font-size: 20px;
  flex-shrink: 0;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-sender {
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  display: block;
}

.notif-item-text {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
  display: block;
}

.notif-empty {
  text-align: center;
  padding: 24px 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.notif-empty span {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

/* ==========================================================================
   CINEMATIC BOTTLE THROW OVERLAY
   ========================================================================== */
.throw-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(3, 10, 20, 0.85) 0%, rgba(2, 6, 12, 0.98) 100%);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  overflow: hidden;
}

.throw-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.splash-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cinematic-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 1. Rolling Parchment Animation */
.rolling-scroll {
  width: 320px;
  height: 220px;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: var(--parchment-base);
  border-radius: 8px;
  border: 2px solid var(--parchment-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.scroll-lines {
  width: 80%;
  height: 3px;
  background: rgba(109, 93, 77, 0.35);
  box-shadow: 0 16px 0 rgba(109, 93, 77, 0.35), 0 32px 0 rgba(109, 93, 77, 0.35), 0 48px 0 rgba(109, 93, 77, 0.35);
}

.wax-seal-stamp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b);
  border: 2px solid #f87171;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  transform: scale(0);
}

/* Rolling animation triggered by class */
.throw-overlay.phase-roll .rolling-scroll {
  opacity: 1;
  animation: rollUpScroll 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.throw-overlay.phase-roll .wax-seal-stamp {
  animation: stampSeal 0.4s 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes rollUpScroll {
  0% { transform: translate(-50%, -50%) scale(1); height: 220px; }
  50% { transform: translate(-50%, -50%) scale(0.9); height: 120px; }
  100% { transform: translate(-50%, -50%) scale(0.5); width: 80px; height: 180px; border-radius: 20px; opacity: 0; }
}

@keyframes stampSeal {
  0% { transform: scale(0) rotate(-20deg); }
  70% { transform: scale(1.25) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* 2. Flying Glass Bottle Animation */
.flying-bottle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 150px;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.flight-bottle-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(79, 209, 197, 0.8));
}

.bottle-stardust {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.throw-overlay.phase-fly .flying-bottle {
  opacity: 1;
  animation: bottleArcThrow 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes bottleArcThrow {
  0% {
    transform: translate(-50%, 20%) scale(0.4) rotate(-35deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translate(-30%, -100%) scale(1) rotate(15deg);
  }
  60% {
    transform: translate(20%, -180%) scale(0.85) rotate(60deg);
  }
  100% {
    transform: translate(60%, 140%) scale(0.45) rotate(140deg);
    opacity: 0;
  }
}

/* 3. Oceanic Splash Shockwaves */
.splash-anchor {
  position: absolute;
  bottom: 24%;
  right: 28%;
  width: 120px;
  height: 40px;
  pointer-events: none;
}

.water-shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(79, 209, 197, 0.8);
  box-shadow: 0 0 25px rgba(56, 178, 172, 0.6);
  opacity: 0;
}

.throw-overlay.phase-splash .water-shockwave {
  animation: shockwaveExpand 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

.throw-overlay.phase-splash .water-shockwave.wave-2 {
  animation-delay: 0.15s;
}

.throw-overlay.phase-splash .water-shockwave.wave-3 {
  animation-delay: 0.35s;
}

@keyframes shockwaveExpand {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; border-width: 4px; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; border-width: 1px; }
}

/* Cinematic Caption */
.cinematic-caption {
  position: absolute;
  bottom: 12%;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.throw-overlay.active .cinematic-caption {
  opacity: 1;
  transform: translateY(0);
}

.caption-title {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(79, 209, 197, 0.6);
  margin-bottom: 6px;
}

.caption-sub {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--cyan-glow);
}

/* ==========================================================================
   Viewport & Navigation
   ========================================================================== */
.viewport {
  position: relative;
  z-index: 5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  padding-left: 140px;
  background: linear-gradient(180deg, rgba(3, 10, 20, 0.9) 0%, rgba(3, 10, 20, 0) 100%);
  z-index: 10;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(79, 209, 197, 0.5);
}

.brand-sub {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan-glow);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quota-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(15, 38, 68, 0.85);
  border: 1px solid rgba(56, 178, 172, 0.4);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.nav-btn {
  background: rgba(15, 38, 68, 0.85);
  border: 1px solid rgba(56, 178, 172, 0.35);
  color: #ffffff;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  transition: all 0.25s ease;
  position: relative;
  font-size: 13px;
}

.nav-btn:hover {
  background: rgba(25, 59, 102, 0.95);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 12px rgba(79, 209, 197, 0.3);
}

.unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--coral-alert);
  color: #fff;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(224, 86, 86, 0.6);
}

/* ==========================================================================
   Central Floating Bottle
   ========================================================================== */
.ocean-scene {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-bottle-container {
  position: absolute;
  bottom: 22%;
  z-index: 4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.bottle-bobber {
  width: 140px;
  height: 190px;
  animation: bottleFloat 5s ease-in-out infinite alternate;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottle-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(79, 209, 197, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

.bottle-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-bottle-container:hover .bottle-svg {
  transform: scale(1.08) rotate(4deg);
}

.floating-bottle-container:hover .bottle-hint {
  color: var(--cyan-glow);
  text-shadow: 0 0 10px rgba(79, 209, 197, 0.6);
}

.bottle-hint {
  margin-top: 14px;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

@keyframes bottleFloat {
  0% { transform: translateY(-16px) rotate(-3deg); }
  50% { transform: translateY(8px) rotate(2deg); }
  100% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes glowPulse {
  0% { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

/* ==========================================================================
   Bottom Action Dock
   ========================================================================== */
.action-dock {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(3, 10, 20, 0.95) 0%, rgba(3, 10, 20, 0) 100%);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cast-btn {
  background: linear-gradient(135deg, #c47b3a, #9c5921);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cast-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(196, 123, 58, 0.45);
}

.fish-btn {
  background: linear-gradient(135deg, var(--seafoam), var(--ocean-teal));
  color: var(--ocean-abyss);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.fish-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(56, 178, 172, 0.5);
}

/* ==========================================================================
   Parchment Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 10, 20, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.parchment-sheet {
  background: var(--parchment-light);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(222, 199, 165, 0.15) 0%, rgba(196, 165, 123, 0.25) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(222, 199, 165, 0.15) 25px);
  width: 100%;
  max-width: 540px;
  border-radius: 16px;
  border: 2px solid var(--parchment-border);
  box-shadow: 0 24px 60px var(--parchment-shadow), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  padding: 30px;
  color: var(--ink-dark);
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .parchment-sheet {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--ink-faded);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink-dark);
}

.parchment-header {
  text-align: center;
  margin-bottom: 20px;
}

.parchment-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink-dark);
  margin-bottom: 6px;
}

.parchment-subtitle {
  font-family: 'Spectral', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-faded);
}

.parchment-body textarea {
  width: 100%;
  height: 180px;
  background: var(--parchment-base);
  border: 1px solid var(--parchment-border);
  border-radius: 10px;
  padding: 16px;
  font-family: 'Spectral', serif;
  font-size: 16.5px;
  color: var(--ink-dark);
  line-height: 1.6;
  resize: none;
  outline: none;
}

.parchment-body textarea:focus {
  border-color: var(--cork-amber);
  box-shadow: 0 0 10px rgba(196, 123, 58, 0.2);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--ink-faded);
  margin-top: 6px;
}

.parchment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--parchment-border);
  color: var(--ink-faded);
  padding: 11px 22px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(222, 199, 165, 0.25);
  color: var(--ink-dark);
}

.btn-primary {
  background: var(--cork-amber);
  border: none;
  color: #ffffff;
  padding: 11px 24px;
  border-radius: 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #a96328;
  transform: translateY(-1px);
}

/* Read Bottle Modal Elements */
.bottle-finder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--parchment-border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-large {
  font-size: 28px;
  background: rgba(196, 123, 58, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-meta h3 {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  color: var(--ink-dark);
}

.toss-meta {
  font-size: 12px;
  color: var(--ink-faded);
}

.flag-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.flag-btn:hover {
  opacity: 1;
}

.letter-scroll {
  background: var(--parchment-base);
  border-radius: 10px;
  padding: 20px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--parchment-border);
}

.letter-text {
  font-family: 'Spectral', serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1.65;
  color: var(--ink-dark);
  white-space: pre-wrap;
}

.reply-section {
  margin-top: 16px;
}

.reply-section textarea {
  width: 100%;
  height: 90px;
  background: var(--parchment-base);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 12px;
  font-family: 'Spectral', serif;
  font-size: 15px;
  resize: none;
  outline: none;
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* ==========================================================================
   Drawer (Logbook & My Bottles)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 10, 20, 0.65);
  backdrop-filter: blur(8px);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--ocean-navy);
  border-left: 1px solid rgba(56, 178, 172, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

.drawer-overlay.active .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 1px;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--cyan-glow);
  border-bottom-color: var(--seafoam);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conv-card, .bottle-card {
  background: rgba(7, 17, 31, 0.7);
  border: 1px solid rgba(56, 178, 172, 0.2);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.conv-card:hover, .bottle-card:hover {
  border-color: var(--cyan-glow);
  background: rgba(14, 122, 138, 0.3);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--cyan-glow);
}

.card-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.card-preview {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--sand-gold);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtext {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

/* ==========================================================================
   Chat Modal (1-on-1 Real-time Messaging)
   ========================================================================== */
.chat-container {
  background: var(--ocean-navy);
  border: 1px solid rgba(56, 178, 172, 0.4);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  height: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.chat-header {
  padding: 16px 20px;
  background: var(--ocean-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.partner-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  font-size: 24px;
}

.partner-info h3 {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: #ffffff;
}

.online-status {
  font-size: 11px;
  color: var(--cyan-glow);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-bottle-quote {
  padding: 8px 16px;
  background: rgba(14, 122, 138, 0.25);
  border-bottom: 1px solid rgba(56, 178, 172, 0.2);
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--sand-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.msg-bubble.me {
  align-self: flex-end;
  background: var(--seafoam);
  color: var(--ocean-abyss);
  border-bottom-right-radius: 3px;
  font-weight: 500;
}

.msg-bubble.partner {
  align-self: flex-start;
  background: var(--parchment-base);
  color: var(--ink-dark);
  border-bottom-left-radius: 3px;
  font-family: 'Spectral', serif;
  font-size: 15px;
}

.msg-time {
  font-size: 10px;
  opacity: 0.7;
  display: block;
  margin-top: 3px;
  text-align: right;
}

.chat-form {
  padding: 12px 16px;
  background: var(--ocean-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
}

.chat-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(56, 178, 172, 0.3);
  border-radius: 20px;
  padding: 10px 16px;
  color: #ffffff;
  outline: none;
  font-size: 14px;
}

.chat-send-btn {
  background: var(--seafoam);
  border: none;
  color: var(--ocean-abyss);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ==========================================================================
   Profile Modal
   ========================================================================== */
.avatar-picker {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
}

.avatar-choice {
  font-size: 24px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(222, 199, 165, 0.3);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.avatar-choice.active, .avatar-choice:hover {
  background: var(--cork-amber);
  transform: scale(1.15);
}

.profile-field label {
  display: block;
  font-size: 13px;
  color: var(--ink-faded);
  margin-bottom: 6px;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  background: var(--parchment-base);
  font-size: 15px;
  color: var(--ink-dark);
  outline: none;
}

.btn-primary.small {
  padding: 8px 16px;
  font-size: 13px;
}

.quota-info-box {
  margin-top: 20px;
  background: rgba(222, 199, 165, 0.35);
  border-radius: 10px;
  padding: 14px;
  font-size: 13.5px;
}

.quota-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15, 38, 68, 0.95);
  border: 1px solid var(--seafoam);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .navbar {
    padding: 14px 16px;
    padding-left: 100px;
  }
  .brand-title {
    font-size: 16px;
  }
  .quota-pill span:last-child {
    display: none;
  }
  .action-dock {
    padding: 16px;
    gap: 10px;
  }
  .action-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
  .notif-dropdown {
    width: 290px;
    right: -40px;
  }
}
