/* --------------------------------------------------
   DESIGN SYSTEM & CUSTOM STYLES — CE SOIR ?
   -------------------------------------------------- */

:root {
  /* Color Palette (Deep dark indigo, soft glowing pinks and violets) */
  --bg-primary: #0a0817;
  --bg-card: rgba(18, 15, 38, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-rose: #f43f5e;
  --accent-gold: #f59e0b;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --glow-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  --glass-blur: blur(20px);
  
  /* Fonts */
  --font-family: 'Outfit', sans-serif;
  
  /* Safe area heights for modern notches */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --------------------------------------------------
   BASE STYLES & RESET
   -------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: 400;
  min-height: 100vh;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------
   AMBIENT BACKGROUND GLOWS
   -------------------------------------------------- */
.ambient-glow {
  position: absolute;
  top: -10%;
  left: -20%;
  width: 140%;
  height: 60%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.05) 50%, rgba(0,0,0,0) 100%);
  z-index: -2;
  pointer-events: none;
}

.ambient-glow-2 {
  position: absolute;
  bottom: -10%;
  right: -20%;
  width: 140%;
  height: 60%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.02) 60%, rgba(0,0,0,0) 100%);
  z-index: -1;
  pointer-events: none;
}

/* App container constrained to mobile aspect ratio on desktop */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: calc(8px + var(--safe-top)) 16px calc(100px + var(--safe-bottom)) 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom Scrollbar for container */
.app-container::-webkit-scrollbar {
  width: 4px;
}
.app-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* --------------------------------------------------
   HEADER
   -------------------------------------------------- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  animation: fadeIn 0.4s ease-out;
  padding-top: 4px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.5rem;
}

.header-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #e879f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Language Selector */
.lang-selector {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(236,72,153,0.2));
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--text-primary);
}

.lang-btn:active {
  transform: scale(0.95);
}

/* Consent screen language selector */
.consent-lang {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

/* Language dropdown in settings */
.lang-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 12px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* --------------------------------------------------
   GLOBAL UI ELEMENTS
   -------------------------------------------------- */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  position: relative;
}

.text-center {
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Buttons */
button {
  font-family: var(--font-family);
  cursor: pointer;
  outline: none;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.primary-button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.primary-button .btn-desc {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.secondary-button:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.97);
}

.secondary-button .btn-desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 2px;
}

.icon-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.95);
}

.danger-button {
  background: var(--accent-rose);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  margin-top: 10px;
}

.danger-button-outline {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  margin-top: 10px;
}

.danger-button-outline:active {
  background: rgba(244, 63, 94, 0.1);
}

.danger-link {
  color: var(--text-muted);
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  padding: 10px;
}

.danger-link:active {
  color: var(--accent-rose);
}

.back-link {
  background: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: inline-block;
}

/* --------------------------------------------------
   FORMS & INPUTS
   -------------------------------------------------- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

label .optional {
  font-size: 0.8rem;
  color: var(--text-muted);
}

input[type="text"], input[type="time"] {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  padding: 16px;
  border-radius: 16px;
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
  user-select: text; /* Allow keyboard input on mobile */
}

input[type="text"]:focus, input[type="time"]:focus {
  border-color: var(--accent-purple);
}

/* --------------------------------------------------
   CONSENT SCREEN
   -------------------------------------------------- */
.consent-rules {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.consent-rules.tight {
  margin-bottom: 0;
}

.rule-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.rule-bullet {
  font-size: 1.2rem;
}

/* --------------------------------------------------
   WELCOME / HOME VIEW
   -------------------------------------------------- */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding: 20px 0;
}

.welcome-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.welcome-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(255,255,255,0.05);
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.action-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.divider {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  gap: 12px;
}

.divider::before, .divider::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--border-glass);
}

/* --------------------------------------------------
   QR CODE VIEW (INVITATION)
   -------------------------------------------------- */
.qr-wrapper {
  background: white;
  padding: 16px;
  border-radius: 20px;
  display: inline-block;
  margin: 20px auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
}

#invite-qrcode canvas {
  display: block;
}

.qr-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.invite-url-container {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}

.invite-url-text {
  flex-grow: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  line-height: 1.4;
}

.copy-button {
  background: var(--accent-purple);
  color: white;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.85rem;
}

.invite-expiry-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.waiting-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--accent-pink);
  margin: 16px 0;
}

/* Pulsing loader rings */
.pulse-ring {
  width: 10px;
  height: 10px;
  background: var(--accent-pink);
  border-radius: 50%;
  animation: pulse 1.5s infinite ease-in-out;
}

/* --------------------------------------------------
   DAILY DASHBOARD
   -------------------------------------------------- */
.dashboard-head {
  margin-top: 10px;
  margin-bottom: 24px;
}

.today-date {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-pink);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dashboard-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.slider-card {
  padding: 28px 20px;
}

.mood-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.mood-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: bounce 2s infinite ease-in-out;
}

.mood-label {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mood-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 260px;
}

/* Custom Touch Input Range Slider */
.custom-slider-container {
  position: relative;
  width: 100%;
  margin: 20px 0 35px 0;
}

.custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.1);
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
  transition: transform 0.1s ease;
}

.custom-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
}

.slider-ticks span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.shortcut-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-align: left;
}

.shortcut-btn:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-purple);
}

.shortcut-icon {
  font-size: 1.4rem;
}

.shortcut-label {
  font-size: 0.85rem;
  font-weight: 600;
}

/* --------------------------------------------------
   WAITING SCREEN
   -------------------------------------------------- */
.waiting-heart {
  font-size: 4rem;
  margin: 20px auto;
  animation: beat 1.2s infinite ease-in-out;
}

.partner-status-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.discreet-tip {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 12px;
}

/* --------------------------------------------------
   RESULT SCREEN
   -------------------------------------------------- */
.result-card {
  padding: 40px 24px;
}

.result-celebration {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: bounce 2s infinite ease-in-out;
}

.result-badge {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.result-details {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

/* --------------------------------------------------
   CALENDAR / HISTORY VIEW
   -------------------------------------------------- */
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.month-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arrow-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.arrow-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

#calendar-month-year {
  font-size: 0.9rem;
  font-weight: 600;
}

.calendar-card {
  padding: 16px;
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.current-month {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.calendar-day.today {
  border: 1px solid rgba(255,255,255,0.3);
}

/* Match states on calendar dot */
.calendar-day.match-neutral {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.calendar-day.match-tenderness {
  background: rgba(236, 72, 153, 0.25);
  color: var(--accent-pink);
  border: 1px solid var(--accent-pink);
  font-weight: bold;
}

.calendar-day.match-intimate {
  background: rgba(139, 92, 246, 0.35);
  color: #c084fc;
  border: 1px solid var(--accent-purple);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  font-weight: bold;
}

.memories-section {
  margin-top: 24px;
}

.memories-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.memory-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.memory-emoji {
  font-size: 1.5rem;
}

.memory-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.memory-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.memory-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------
   SETTINGS
   -------------------------------------------------- */
.settings-section {
  margin-bottom: 24px;
}

.settings-section h3 {
  font-size: 0.95rem;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 12px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.95rem;
}

.settings-item .value {
  color: var(--text-secondary);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.settings-row.indent {
  padding-left: 20px;
}

.settings-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -6px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.danger-zone {
  border-top: 1px solid rgba(244, 63, 94, 0.2);
  padding-top: 16px;
}

/* Toggle Switches */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  outline: none;
  transition: background 0.2s ease;
}

input[type="checkbox"]:checked {
  background: var(--accent-pink);
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

/* --------------------------------------------------
   MODAL SYSTEM
   -------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 4, 12, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  margin-bottom: 0;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.max-width-scanner {
  max-width: 440px;
}

#scanner-reader {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.manual-input-box {
  margin: 16px 0;
}

/* --------------------------------------------------
   BOTTOM NAVIGATION BAR
   -------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  height: 66px;
  background: rgba(18, 15, 38, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(139, 92, 246, 0.1);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-item {
  background: none;
  border: none;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 3px;
  flex-grow: 1;
  height: 50px;
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-icon {
  font-size: 1.2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px var(--accent-pink));
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Small glowing indicator dot under active tab */
.nav-item::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent-pink);
  box-shadow: 0 0 8px var(--accent-pink);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active::after {
  opacity: 1;
  transform: scale(1);
}

/* --------------------------------------------------
   TOAST NOTIFICATION SYSTEM
   -------------------------------------------------- */
.toast-container {
  position: fixed;
  top: calc(20px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  padding: 0 16px;
  pointer-events: none;
}

.toast {
  background: rgba(18, 15, 38, 0.95);
  border: 1px solid var(--border-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: white;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.4);
}

/* --------------------------------------------------
   SPINNER & TRANSITIONS
   -------------------------------------------------- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 4, 12, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes beat {
  0% { transform: scale(1); }
  25% { transform: scale(1.1); }
  40% { transform: scale(1); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

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

/* Duo View Custom Styles */
.duo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  margin-top: 10px;
}

.duo-avatar-pair {
  font-size: 3rem;
  margin-bottom: 8px;
  display: block;
  animation: pulse 3s infinite ease-in-out;
}

.duo-title-editable:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.duo-title-editable:active {
  transform: translateY(0);
}

.duo-members-info {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin-top: 15px;
  padding: 15px 0 0 0;
  border-top: 1px solid var(--border-glass);
}

.duo-member {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.member-role-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.duo-heart-divider {
  font-size: 1.5rem;
  padding: 0 10px;
  animation: beat 2s infinite ease-in-out;
}
