/* ============================================================
   SỨA2408 VAULT - ULTRA MODERN ROMANTIC STYLESHEET
   Aesthetic, Cozy, Responsive & Glassmorphic UI/UX
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Light Theme (Warm Blush & Soft Marshmallow) */
  --bg: #fcf8fa;
  --bg-mesh: radial-gradient(at 0% 0%, rgba(254, 205, 211, 0.45) 0px, transparent 50%),
             radial-gradient(at 100% 0%, rgba(237, 233, 254, 0.4) 0px, transparent 50%),
             radial-gradient(at 50% 100%, rgba(255, 228, 230, 0.5) 0px, transparent 50%);
  --surface: #ffffff;
  --surface-alt: #fdf2f4;
  --surface-hover: #fff1f3;
  --border: #f3d5dc;
  --border-strong: #f43f5e;
  
  --text: #1e1b2e;
  --text-muted: #645b73;
  --text-light: #9d93ad;
  
  --rose: #f43f5e;
  --rose-hover: #e11d48;
  --rose-light: #ffe4e6;
  --rose-border: #fecdd3;
  --rose-glow: rgba(244, 63, 94, 0.25);
  
  --accent: #8b5cf6;
  --accent-light: #f3e8ff;
  --accent-border: #ddd6fe;
  
  --emerald: #10b981;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;
  
  --amber: #f59e0b;
  --amber-light: #fffbeb;
  --amber-border: #fde68a;
  
  --shadow-xs: 0 1px 2px rgba(225, 29, 72, 0.04);
  --shadow-sm: 0 2px 8px rgba(225, 29, 72, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(225, 29, 72, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 16px 36px -6px rgba(225, 29, 72, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.03);
  --shadow-polaroid: 0 12px 30px -8px rgba(244, 63, 94, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  --bg: #0f0d15;
  --bg-mesh: radial-gradient(at 0% 0%, rgba(136, 19, 55, 0.3) 0px, transparent 50%),
             radial-gradient(at 100% 0%, rgba(88, 28, 135, 0.25) 0px, transparent 50%),
             radial-gradient(at 50% 100%, rgba(76, 5, 25, 0.2) 0px, transparent 50%);
  --surface: #181523;
  --surface-alt: #221c30;
  --surface-hover: #2d2440;
  --border: #2e2640;
  --border-strong: #fb7185;
  
  --text: #fdf2f8;
  --text-muted: #cbd5e1;
  --text-light: #94a3b8;
  
  --rose: #fb7185;
  --rose-hover: #f43f5e;
  --rose-light: rgba(251, 113, 133, 0.15);
  --rose-border: rgba(251, 113, 133, 0.3);
  --rose-glow: rgba(251, 113, 133, 0.25);
  
  --accent: #c084fc;
  --accent-light: rgba(192, 132, 252, 0.15);
  --accent-border: rgba(192, 132, 252, 0.3);
  
  --emerald: #34d399;
  --emerald-light: rgba(52, 211, 153, 0.15);
  --emerald-border: rgba(52, 211, 153, 0.3);
  
  --amber: #fbbf24;
  --amber-light: rgba(251, 191, 36, 0.15);
  --amber-border: rgba(251, 191, 36, 0.3);
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-polaroid: 0 14px 34px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

/* Cute jellyfish SVG animation */
.jelly-svg {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px var(--rose-glow));
  transition: transform 0.25s ease;
}
.jelly-svg:hover {
  transform: translateY(-2px) scale(1.08);
}

/* ============================================================
   HEADER & NAVBAR
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .app-header {
  background: rgba(24, 21, 35, 0.85);
}

.app-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.brand-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-badge:hover .brand-logo-wrap {
  transform: rotate(-6deg) scale(1.08);
}

.brand-title {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--rose), #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================================
   BUTTONS & CONTROLS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1.5px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0.5px) scale(0.98);
}

.btn-xs {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

.btn-accent {
  background: var(--accent-light);
  color: var(--accent) !important;
  border-color: var(--accent-border) !important;
}
.btn-accent:hover {
  background: #ede9fe;
}

.panic-btn {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.panic-btn:hover {
  background: #dc2626 !important;
}

.chip-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chip-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* ============================================================
   PIN LOCK VIEW STYLES
   ============================================================ */
.pin-lock-stage {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.pin-lock-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeInPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInPop {
  0% { opacity: 0; transform: scale(0.94) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.pin-lock-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1.5px solid var(--rose-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 8px 20px var(--rose-glow);
  position: relative;
}

.pin-lock-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-md) + 4px);
  border: 2px dashed var(--rose-border);
  opacity: 0.6;
  animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pin-lock-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.pin-lock-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

.pin-dots-row {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.filled {
  background: linear-gradient(135deg, var(--rose), #fb7185);
  border-color: var(--rose);
  transform: scale(1.2);
  box-shadow: 0 0 14px var(--rose-glow);
}

.pin-feedback {
  min-height: 24px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rose);
  margin-bottom: 1.2rem;
  transition: all 0.2s ease;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pin-key:hover {
  background: var(--surface-hover);
  border-color: var(--rose-border);
  transform: scale(1.06);
}

.pin-key:active {
  transform: scale(0.92);
  background: var(--rose-light);
  border-color: var(--rose);
}

.key-util {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
}

.shake-anim {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ============================================================
   DAILY FEED & HERO HEADER
   ============================================================ */
.daily-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem 1rem;
  width: 100%;
}

.daily-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.daily-header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f43f5e, #fb7185, #c084fc, #f43f5e);
  background-size: 300% 100%;
  animation: shimmerBorder 8s ease infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.daily-header-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
  flex-wrap: wrap;
}

.daily-avatar-pair {
  display: flex;
  align-items: center;
  position: relative;
}

.daily-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.av-girl {
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  z-index: 2;
  position: relative;
  cursor: pointer;
}
.av-girl:hover {
  transform: scale(1.12) rotate(-6deg);
}

.av-boy {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  margin-left: -14px;
  z-index: 1;
}
.av-boy:hover {
  transform: scale(1.12) rotate(6deg);
}

.daily-header-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.daily-header-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.daily-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* ============================================================
   POLAROID MEMORY GRID & 3D CARDS (PERFECT 3D FLIP)
   ============================================================ */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-heading {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.6rem;
  margin-bottom: 2.6rem;
}

@media (max-width: 480px) {
  .polaroid-grid {
    grid-template-columns: 1fr;
  }
}

.polaroid-wrapper {
  perspective: 1200px;
  -webkit-perspective: 1200px;
  min-height: 520px;
  height: 520px;
  position: relative;
  display: block;
}

.polaroid-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
}

.polaroid-card.flipped {
  transform: rotateY(180deg) !important;
}

.polaroid-face {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-polaroid);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.polaroid-front {
  transform: rotateY(0deg);
  z-index: 2;
}

/* Washi tape accent on top */
.polaroid-front::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 18px;
  background: rgba(254, 205, 211, 0.7);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.polaroid-back {
  transform: rotateY(180deg) !important;
  background: var(--surface);
  border-color: var(--rose-border);
  justify-content: space-between;
  z-index: 1;
}

.polaroid-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: #0d0a14;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.polaroid-img-backdrop {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.65) saturate(1.2);
  opacity: 0.85;
  transform: scale(1.15);
  pointer-events: none;
  z-index: 1;
}

.polaroid-img-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  text-decoration: none;
  cursor: zoom-in;
}

.polaroid-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* HIỂN THỊ 100% NGUYÊN VẸN TOÀN BỘ ẢNH, KHÔNG BỊ CẮT XÉN */
  display: block;
  margin: auto;
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: filter 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .polaroid-img-link:hover .polaroid-img {
    transform: scale(1.02);
  }
}

.polaroid-img-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-muted);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--surface-alt) 0%, var(--surface) 100%);
  padding: 1rem;
  text-align: center;
}

/* Sensitive hold-to-reveal blur */
.is-sensitive {
  filter: blur(24px) grayscale(30%);
  transition: filter 0.25s ease-out;
  user-select: none;
}

.is-sensitive.revealed {
  filter: blur(0px) grayscale(0%) !important;
}

.sensitive-overlay-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.polaroid-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.polaroid-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.polaroid-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.polaroid-caption {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.polaroid-front-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.polaroid-flip-btn {
  background: var(--surface-alt);
  border: 1px solid var(--rose-border);
  color: var(--rose);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.polaroid-flip-btn:hover {
  background: var(--rose);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--rose-glow);
}

/* ============================================================
   BUCKET LIST & DỰ ÁN MA
   ============================================================ */
.bucket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bucket-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-count {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.bucket-progress-bar {
  width: 100%;
  height: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.3rem;
}

.bucket-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #fb7185, #c084fc);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bucket-list-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
}

.bucket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.bucket-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateX(2px);
}

.bucket-item.completed {
  opacity: 0.65;
  background: var(--surface);
}

.bucket-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
  user-select: none;
}

.bucket-check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--rose-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffffff;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.bucket-item.completed .bucket-check-circle {
  background: linear-gradient(135deg, var(--rose), #fb7185);
  border-color: var(--rose);
}

.bucket-item.completed span {
  text-decoration: line-through;
  color: var(--text-light);
}

.bucket-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bucket-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bucket-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-light);
}

/* ============================================================
   MODALS (BÍ KÍP, THÊM KỶ NIỆM, DEEP VAULT)
   ============================================================ */
.mem-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  animation: modalFadeIn 0.25s ease-out forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mem-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 1.8rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% { transform: scale(0.94) translateY(14px); }
  100% { transform: scale(1) translateY(0); }
}

.mem-form-group {
  margin-bottom: 1.15rem;
}

.mem-form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.mem-form-input, .mem-form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.mem-form-input:focus, .mem-form-textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-light);
}

.mem-upload-area {
  border: 2px dashed var(--rose-border);
  border-radius: var(--radius-md);
  padding: 1.6rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--surface-alt);
  transition: all 0.2s ease;
}
.mem-upload-area:hover {
  background: var(--rose-light);
  border-color: var(--rose);
}

/* Bí kíp cards */
.bikip-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bikip-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.bikip-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.bikip-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.bikip-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
}

.bikip-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.bikip-formula {
  display: inline-block;
  margin: 0.4rem 0;
  padding: 0.35rem 0.85rem;
  background: var(--rose-light);
  color: var(--rose);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.92rem;
}

/* ============================================================
   ANIMATIONS & PARTICLES
   ============================================================ */
.love-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 100000;
  animation: floatUp 1.2s ease-out forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.8); }
  100% { opacity: 0; transform: translateY(-70px) scale(1.4); }
}

/* Thư viện hiện đại bổ sung */


  50% { opacity: 0; }
}

.days-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--rose-light);
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rose-border);
  margin-top: 0.25rem;
}

/* Fancybox custom theme colors */
.fancybox__backdrop {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(10px) !important;
}
.fancybox__caption {
  font-family: var(--font) !important;
  font-size: 0.95rem !important;
  color: #fff !important;
}

/* ============================================================
   CĂN PHÒNG BÍ MẬT & PHIẾU YÊU THƯƠNG (DEEP VAULT UI/UX)
   ============================================================ */
.secret-room-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem 1rem;
  width: 100%;
  animation: fadeInPop 0.4s ease-out forwards;
}

.secret-banner-card {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(168, 85, 247, 0.1));
  border: 1.5px solid var(--rose-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.2);
  position: relative;
  overflow: hidden;
}

.secret-quote-box {
  background: var(--surface);
  border: 1px dashed var(--rose-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-top: 1.2rem;
  position: relative;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.secret-quote-box::before {
  content: '“';
  font-size: 3.5rem;
  color: var(--rose);
  opacity: 0.25;
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: serif;
}

/* Coupon Tickets */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.coupon-ticket {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.25s ease;
  overflow: hidden;
}

.coupon-ticket:hover {
  transform: translateY(-3px);
  border-color: var(--rose);
  box-shadow: 0 8px 24px var(--rose-glow);
}

.coupon-ticket.is-used {
  opacity: 0.6;
  background: var(--surface-alt);
  border-style: dashed;
}

.coupon-ticket-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.coupon-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rose-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.coupon-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.coupon-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.coupon-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

/* Touch / Click to reveal on mobile & desktop */
.hold-reveal-target {
  -webkit-touch-callout: none;
  user-select: none;
  cursor: pointer;
}

.hold-reveal-target .is-sensitive {
  filter: blur(28px) grayscale(30%);
  transition: filter 0.25s ease-out;
}

.hold-reveal-target.revealed .is-sensitive,
.is-sensitive.revealed {
  filter: blur(0px) grayscale(0%) !important;
}

@media (hover: hover) {
  .hold-reveal-target:hover .is-sensitive {
    filter: blur(0px) grayscale(0%) !important;
  }
  .hold-reveal-target:hover .sensitive-overlay-pill {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .hold-reveal-target:hover .sensitive-reblur-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

.sensitive-overlay-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 10;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.sensitive-overlay-pill:hover {
  background: var(--rose);
  transform: translateX(-50%) scale(1.05);
}

.hold-reveal-target.revealed .sensitive-overlay-pill {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(10px) !important;
}

.sensitive-reblur-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hold-reveal-target.revealed .sensitive-reblur-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.sensitive-reblur-btn:hover {
  background: var(--rose);
  transform: scale(1.1);
}

.expand-hint-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  z-index: 3;
  backdrop-filter: blur(4px);
}


/* --- RICH FEATURES STYLES --- */
/* 1. Mood Tracker Card */
.mood-tracker-card {
  background: var(--surface);
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.25s ease;
}

.mood-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.mood-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mood-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-alt);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rose-dark);
  border: 1px solid var(--rose-border);
}

.mood-buttons-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.mood-btn {
  flex: 1 1 calc(20% - 0.5rem);
  min-width: 65px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mood-btn:hover {
  border-color: var(--rose);
  transform: translateY(-2px);
  background: var(--rose-light);
}

.mood-btn.active {
  border-color: var(--rose);
  background: var(--rose-light);
  color: var(--rose-dark);
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.25);
  transform: scale(1.03);
}

.mood-btn-icon {
  font-size: 1.3rem;
}

.hug-btn {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 3px 12px rgba(244, 63, 94, 0.35);
  transition: all 0.2s ease;
}

.hug-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(244, 63, 94, 0.5);
}

.hug-btn:active {
  transform: scale(0.95);
}

/* 2. Heart Counter Pill */
.heart-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-alt);
  border: 1px solid var(--rose-border);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rose-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.heart-counter-pill:hover {
  transform: scale(1.05);
  border-color: var(--rose);
}

.heart-counter-pill:active {
  transform: scale(0.95);
}

/* 3. Whispers in Deep Vault (Modern Real-time Chat UI with Chat Dock & SimpleBar) */
.whispers-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1rem;
}

.whispers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.whispers-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
  user-select: none;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: liveDotPulse 2s infinite ease-in-out;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #10b981; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #10b981; }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #10b981; }
}

/* Whispers List SimpleBar Container */
.whispers-list {
  max-height: 400px;
  min-height: 200px;
  margin-bottom: 0.75rem;
  padding-right: 0.35rem;
}

.whispers-list .simplebar-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.5rem 0.4rem 0.5rem 0.1rem;
}

/* SimpleBar Floating Scrollbar Styling */
.simplebar-scrollbar::before {
  background: var(--rose) !important;
  opacity: 0.4 !important;
  border-radius: 999px !important;
  transition: opacity 0.2s ease, background 0.2s ease !important;
}

.simplebar-scrollbar.simplebar-visible::before {
  opacity: 0.8 !important;
}

[data-theme="dark"] .simplebar-scrollbar::before {
  background: #fb7185 !important;
}

.whispers-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.whisper-item {
  display: flex;
  gap: 0.65rem;
  max-width: 86%;
  animation: whisperFadeIn 0.25s ease-out;
}

@keyframes whisperFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.whisper-item.sua {
  align-self: flex-start;
}

.whisper-item.anh {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.whisper-item.pending {
  opacity: 0.7;
}

.whisper-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--shadow-color);
  user-select: none;
}

.whisper-avatar.sua {
  background: linear-gradient(135deg, #fff1f2, #fbcfe8);
  border: 1.5px solid #fb7185;
}

.whisper-avatar.anh {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 1.5px solid #38bdf8;
}

.whisper-bubble-wrap {
  display: flex;
  flex-direction: column;
}

.whisper-content-box {
  border-radius: 18px 18px 18px 4px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  position: relative;
  word-break: break-word;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease;
}

.whisper-item.anh .whisper-content-box {
  border-radius: 18px 18px 4px 18px;
}

.whisper-item.sua .whisper-content-box {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-left: 3.5px solid #f43f5e;
}

.whisper-item.anh .whisper-content-box {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(59, 130, 246, 0.12));
  color: var(--text);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-right: 3.5px solid #0284c7;
}

[data-theme="dark"] .whisper-item.sua .whisper-content-box {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.35);
  border-left: 3.5px solid #fb7185;
}

[data-theme="dark"] .whisper-item.anh .whisper-content-box {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.35);
  border-right: 3.5px solid #38bdf8;
}

.whisper-sender-tag {
  font-weight: 700;
  font-size: 0.74rem;
  margin-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.whisper-sender-tag.sua {
  color: #e11d48;
}

.whisper-sender-tag.anh {
  color: #0284c7;
}

[data-theme="dark"] .whisper-sender-tag.sua {
  color: #fda4af;
}

[data-theme="dark"] .whisper-sender-tag.anh {
  color: #7dd3fc;
}

.whisper-text {
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-wrap;
}

.whisper-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.whisper-item.anh .whisper-meta-row {
  justify-content: flex-end;
}

.whisper-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.whisper-del-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
}

.whisper-del-btn:hover {
  opacity: 1;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.whisper-del-btn svg {
  width: 13px;
  height: 13px;
}

/* Sender Toggle Controls */
.whisper-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.whisper-sender-toggle {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

.sender-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.sender-pill:hover {
  color: var(--text);
}

.sender-pill.active.sua {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
}

.sender-pill.active.anh {
  background: linear-gradient(135deg, #0284c7, #3b82f6);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.sender-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Modern Chat Dock & Textarea */
.chat-dock-box {
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-dock-box:focus-within {
  border-color: var(--rose-border);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.quick-emoji-tray {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}
.quick-emoji-tray::-webkit-scrollbar {
  display: none;
}

.quick-emoji-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
  margin-right: 0.2rem;
}

.quick-emoji-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.22rem 0.55rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}

.quick-emoji-btn:hover {
  transform: scale(1.2);
  border-color: var(--rose);
}

.quick-emoji-btn:active {
  transform: scale(0.95);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.65rem 0.45rem 0.85rem;
  transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--rose);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.1);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.2rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 120px;
  font-family: inherit;
  overflow-y: auto;
}

.chat-textarea::placeholder {
  color: var(--text-light);
  font-size: 0.84rem;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
  opacity: 0.7;
}

.chat-send-btn.has-text,
.chat-send-btn:hover {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.45);
}

.chat-send-btn:active {
  transform: scale(0.92);
}

.chat-send-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

/* SweetAlert2 Romantic Custom Styling */
.romantic-swal-popup {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  font-family: inherit !important;
  padding: 1.5rem !important;
}

.romantic-swal-popup .swal2-title {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
}

.romantic-swal-popup .swal2-html-container {
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
}

[data-theme="dark"] .romantic-swal-popup {
  background: #1e1b2e !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

/* Universal Modern Input & Textarea Styling */
.mem-input,
.mem-form-input,
.mem-form-textarea,
.bucket-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.mem-input:focus,
.mem-form-input:focus,
.mem-form-textarea:focus,
.bucket-input:focus {
  border-color: var(--rose);
  background: var(--surface);
  box-shadow: 0 0 0 3.5px rgba(244, 63, 94, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.mem-input::placeholder,
.bucket-input::placeholder {
  color: var(--text-light);
  font-size: 0.84rem;
}

/* Lucide Icon Helpers */
[data-lucide] {
  vertical-align: middle;
  display: inline-block;
  stroke-width: 2;
}

/* 4. Mini Music Player Button */
.music-toggle-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.music-toggle-btn.playing {
  background: var(--rose-light);
  border-color: var(--rose);
  color: var(--rose-dark);
  animation: pulse-music 2s infinite ease-in-out;
}

@keyframes pulse-music {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}


/* MOBILE PERFORMANCE BOOST */
html, body {
  -webkit-overflow-scrolling: touch;
  text-rendering: optimizeSpeed;
}

.memories-grid {
  contain: layout style;
}

.polaroid-img {
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (max-width: 640px) {
  /* Lightweight mobile rendering without expensive blurs on scrolling layers */
  .polaroid-card {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  }
  .topbar {
    backdrop-filter: blur(8px) !important;
  }
}


/* ============================================================
   PIN LOCK & LAYOUT FAILSAFE STYLES (PREVENT CSS BREAKS)
   ============================================================ */
.topbar, .app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .topbar, [data-theme="dark"] .app-header {
  background: rgba(24, 21, 35, 0.92);
}

.topbar-inner, .app-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-content {
  flex: 1;
  width: 100%;
}

.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: auto;
}

.pin-card-wrapper, .pin-lock-stage {
  min-height: calc(100vh - 140px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem 1rem;
  width: 100%;
}

.pin-card, .pin-lock-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-lg) !important;
  text-align: center;
  margin: 0 auto;
}

.pin-display, .pin-dots-row, .pin-dots {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 1.1rem !important;
  margin: 1.2rem auto 1.6rem auto !important;
}

.pin-dot {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 2px solid var(--border-strong) !important;
  background: transparent !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.filled {
  background: linear-gradient(135deg, var(--rose), #fb7185) !important;
  border-color: var(--rose) !important;
  transform: scale(1.2);
  box-shadow: 0 0 14px var(--rose-glow);
}

.pin-title, .pin-lock-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.pin-subtitle, .pin-lock-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

.pin-status-msg, .pin-feedback {
  min-height: 24px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rose);
  margin-bottom: 1.2rem;
  transition: all 0.2s ease;
}


/* ============================================================
   DEEP VAULT (CĂN PHÒNG KÍN) MODERN UI/UX SUITE
   ============================================================ */
.secret-vault-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem 1rem;
  width: 100%;
}

.secret-top-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.secret-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.secret-lock-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(192, 132, 252, 0.15));
  border: 1.5px solid var(--rose-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.secret-title-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.secret-sub-text {
  font-size: 0.76rem;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Secret Gallery Grid (2-cols on mobile, 3-cols on desktop) */
.secret-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .secret-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.secret-photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secret-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--rose-border);
}

.secret-photo-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  background: #0d0a14;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secret-photo-backdrop {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.65) saturate(1.2);
  opacity: 0.85;
  transform: scale(1.15);
  pointer-events: none;
  z-index: 1;
}

.secret-photo-img-wrap a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  cursor: zoom-in;
}

.secret-photo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* HIỂN THỊ 100% ẢNH TRONG PHÒNG KÍN */
  display: block;
  margin: auto;
  transition: transform 0.3s ease;
}

.secret-photo-img:hover {
  transform: scale(1.04);
}

.secret-photo-del-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
  z-index: 2;
}

.secret-photo-del-btn:hover {
  background: #ef4444;
}

.secret-photo-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.secret-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.secret-photo-badge {
  color: var(--rose);
  font-weight: 700;
  background: var(--rose-light);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.secret-photo-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-photo-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.secret-empty-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.8rem 1.5rem;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

/* Jellyfish Avatar Secret Hold Animation */
.jelly-avatar {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.jelly-avatar.holding {
  transform: scale(0.92) !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.7) !important;
  border-color: #f43f5e !important;
  animation: jellySecretHoldPulse 0.5s infinite alternate ease-in-out !important;
}

@keyframes jellySecretHoldPulse {
  0% { transform: scale(0.92); box-shadow: 0 0 10px rgba(244, 63, 94, 0.4); }
  100% { transform: scale(1.06); box-shadow: 0 0 22px rgba(244, 63, 94, 0.85); }
}
