/* ============================================================
   SuperChat — Design System
   Dark Purple Theme | Mobile-first Responsive
   ============================================================ */

/* -- Variables -- */
:root {
  --purple-50:  #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --purple-800: #6b21a8;
  --purple-900: #581c87;

  --bg-base:    #0a0a12;
  --bg-card:    #13131f;
  --bg-panel:   #1a1a2e;
  --bg-hover:   #1e1e35;
  --bg-input:   #0d0d1a;
  --bg-msg-me:  #4c1d95;
  --bg-msg-other: #1e1e35;

  --border:     #2a2a45;
  --border-light: #3a3a5c;

  --text-primary:   #f1f0ff;
  --text-secondary: #a09ec0;
  --text-muted:     #6b6988;

  --success: #10b981;
  --error:   #ef4444;
  --warning: #f59e0b;
  --info:    #6366f1;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.4);
  --shadow:     0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.6);
  --shadow-glow: 0 0 20px rgba(124,58,237,.35);

  --neon-purple: #c084fc;
  --neon-strong: 0 0 20px rgba(192,132,252,.7), 0 0 40px rgba(124,58,237,.4);
  --glass-bg:    rgba(10,10,20,.80);
  --glass-border: rgba(124,58,237,.22);

  --transition: .18s ease;
  --navbar-h: 60px;
  --tabbar-h: 68px;
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(124,58,237,.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(88,28,135,.12), transparent),
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%234c1d95' fill-opacity='0.045'%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--purple-400); text-decoration: none; }
a:hover { color: var(--purple-300); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: var(--purple-700); color: #fff; }

/* -- Scrollbar -- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--purple-800); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--purple-700); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .15;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: var(--purple-600);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 300px; height: 300px;
  background: var(--purple-800);
  bottom: -80px; right: -80px;
  animation-delay: 2.5s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: var(--purple-500);
  top: 50%; left: 55%;
  animation-delay: 5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(20px, -20px) scale(1.05); }
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--purple-800), var(--purple-600), var(--purple-500));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-glow), 0 0 40px rgba(124,58,237,.4);
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 20px rgba(124,58,237,.4); }
  50%      { box-shadow: 0 0 35px rgba(168,85,247,.65), 0 0 60px rgba(124,58,237,.25); }
}
.auth-logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, var(--purple-300), var(--purple-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

.auth-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute;
  top: 50%; width: calc(50% - 60px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-label i { margin-right: 6px; color: var(--purple-500); }
.form-input {
  width: 100%;
  background: rgba(8,6,20,.65);
  border: 1px solid rgba(100,70,180,.28);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
  backdrop-filter: blur(8px);
}
.form-input:focus {
  border-color: rgba(168,85,247,.6);
  box-shadow: 0 0 0 3px rgba(124,58,237,.18), 0 0 16px rgba(124,58,237,.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }
.input-upper { text-transform: uppercase; letter-spacing: 2px; }
.input-eye-wrap { position: relative; }
.input-eye-wrap .form-input { padding-right: 44px; }
.input-eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color var(--transition);
  font-size: .9rem;
}
.input-eye:hover { color: var(--purple-400); }

textarea.form-input { resize: vertical; min-height: 90px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius);
  padding: 11px 20px;
  font-size: .93rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #5b21b6, #7c3aed, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,.4), inset 0 1px 0 rgba(255,255,255,.12);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%);
  background-size: 200% 100%; background-position: 200% 0;
  transition: background-position .5s;
}
.btn-primary:hover:not(:disabled)::after { background-position: -200% 0; }
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6, #a78bfa);
  box-shadow: 0 6px 25px rgba(124,58,237,.6), 0 0 18px rgba(168,85,247,.35);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(124,58,237,.4); }

.btn-outline {
  background: rgba(124,58,237,.06);
  color: var(--purple-400);
  border: 1px solid rgba(124,58,237,.45);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(124,58,237,.15);
  border-color: var(--purple-500);
  color: var(--purple-300);
  box-shadow: 0 0 14px rgba(124,58,237,.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,.25);
}

.btn-success {
  background: rgba(16,185,129,.15);
  color: #34d399;
  border: 1px solid rgba(16,185,129,.3);
}
.btn-success:hover:not(:disabled) {
  background: rgba(16,185,129,.25);
}

.btn-sm   { padding: 7px 14px; font-size: .82rem; }
.btn-lg   { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-full); }
.btn-icon.sm { padding: 7px; font-size: .85rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .87rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: rgba(239,68,68,.1);   color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.alert-success { background: rgba(16,185,129,.1);  color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
.alert-info    { background: rgba(99,102,241,.1);  color: #a5b4fc; border: 1px solid rgba(99,102,241,.25); }
.alert-warning { background: rgba(245,158,11,.1);  color: #fcd34d; border: 1px solid rgba(245,158,11,.25); }

/* ============================================================
   POPUP / MODAL
   ============================================================ */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.popup-overlay.active {
  opacity: 1; pointer-events: all;
}

.popup {
  background: rgba(14,14,26,.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(124,58,237,.15);
  transform: scale(.95);
  transition: transform .2s cubic-bezier(.34,1.3,.64,1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.popup-overlay.active .popup { transform: scale(1); }
.popup-sm  { max-width: 360px; }
.popup-lg  { max-width: 600px; }

.popup-close {
  position: absolute; top: 16px; right: 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color var(--transition);
}
.popup-close:hover { color: var(--text-primary); }

.popup-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--purple-800), var(--purple-600));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin: 0 auto 18px;
  box-shadow: 0 0 25px rgba(124,58,237,.5), 0 0 50px rgba(124,58,237,.2);
}
.popup-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.popup-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 20px;
}
.popup-features {
  margin-bottom: 22px;
}
.popup-features li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--text-secondary);
}
.popup-features li:last-child { border-bottom: none; }
.popup-features li i {
  width: 32px; height: 32px;
  background: rgba(124,58,237,.15);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-400);
  flex-shrink: 0;
}
.popup-features li strong { color: var(--text-primary); }
.popup-actions {
  display: flex; gap: 10px;
  margin-top: 20px;
}
.popup-actions .btn { flex: 1; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -- Navbar -- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--navbar-h);
  background: rgba(8,8,18,.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(124,58,237,.28);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 0 rgba(124,58,237,.12), 0 4px 30px rgba(0,0,0,.4);
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px; font-size: 1rem; border-radius: var(--radius-sm);
  margin: 0;
  box-shadow: 0 0 14px rgba(124,58,237,.5);
  animation: logoPulse 4s ease-in-out infinite;
}
.navbar-brand span {
  font-size: 1.1rem; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #e0c3ff, var(--purple-400), #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .02em;
}
.navbar-actions {
  display: flex; align-items: center; gap: 6px;
}
.notif-btn {
  position: relative;
  padding: 8px;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  font-size: 1.1rem;
}
.notif-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--purple-500);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-card);
}
.notif-badge.hidden { display: none; }

.navbar-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(124,58,237,.5);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 0 8px rgba(124,58,237,.3);
}
.navbar-avatar:hover {
  border-color: var(--purple-400);
  box-shadow: 0 0 16px rgba(168,85,247,.6);
}

/* -- Notificaciones dropdown -- */
.notif-dropdown {
  position: fixed; top: var(--navbar-h); right: 12px; z-index: 200;
  width: 320px;
  background: rgba(12,10,24,.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124,58,237,.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(124,58,237,.12);
  overflow: hidden;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: .9rem;
}
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  display: flex; gap: 10px; align-items: flex-start;
  transition: background var(--transition);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(124,58,237,.07); }
.notif-item-icon {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: rgba(124,58,237,.15);
  color: var(--purple-400);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .85rem;
}
.notif-item-text { flex: 1; }
.notif-item-text strong { color: var(--text-primary); }
.notif-item-time { color: var(--text-muted); font-size: .75rem; margin-top: 2px; }
.notif-empty {
  padding: 32px; text-align: center;
  color: var(--text-muted); font-size: .88rem;
}

/* -- Tab Bar -- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--tabbar-h);
  background: rgba(8,8,18,.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(124,58,237,.22);
  box-shadow: 0 -1px 0 rgba(124,58,237,.1), 0 -8px 40px rgba(0,0,0,.5);
  display: flex; align-items: center;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px;
  color: var(--text-muted);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .02em;
  transition: color var(--transition);
  cursor: pointer;
  position: relative;
}
.tab-item i {
  font-size: 1.25rem;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), filter var(--transition);
}
.tab-item.active { color: var(--purple-300); }
.tab-item.active i {
  transform: scale(1.15) translateY(-1px);
  filter: drop-shadow(0 0 7px rgba(192,132,252,.8));
}
.tab-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 3px;
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400));
  border-radius: 0 0 6px 6px;
  box-shadow: 0 0 12px var(--purple-500), 0 0 4px var(--purple-400);
}
.tab-item:hover:not(.active) { color: var(--text-secondary); }
.tab-item:hover:not(.active) i { transform: scale(1.05); }
.tab-badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: #fff; border-radius: var(--radius-full);
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid rgba(8,8,18,.9);
  box-shadow: 0 0 8px rgba(168,85,247,.6);
}

/* -- Main content -- */
.app-main {
  margin-top: var(--navbar-h);
  margin-bottom: var(--tabbar-h);
  min-height: calc(100vh - var(--navbar-h) - var(--tabbar-h));
  position: relative;
}

/* -- Tabs -- */
.tab-content { display: none !important; height: calc(100vh - var(--navbar-h) - var(--tabbar-h)); overflow: hidden; }
.tab-content.active { display: flex !important; flex-direction: column; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(124,58,237,.18);
  background: linear-gradient(90deg, rgba(124,58,237,.07), transparent);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.section-title {
  font-size: .95rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--purple-300));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title i {
  -webkit-text-fill-color: initial;
  color: var(--purple-400);
  filter: drop-shadow(0 0 6px rgba(192,132,252,.5));
}

/* ============================================================
   COINS DISPLAY
   ============================================================ */
.coins-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(168,85,247,.12));
  border: 1px solid rgba(168,85,247,.4);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: .88rem; font-weight: 700;
  color: var(--purple-200);
  box-shadow: 0 0 14px rgba(124,58,237,.2), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
.coins-badge::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.coins-badge i { color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,.6)); }

/* ============================================================
   PERFIL
   ============================================================ */
.profile-page { display: flex; flex-direction: column; overflow-y: auto; }

.profile-hero {
  background: linear-gradient(165deg, rgba(88,28,135,.35) 0%, rgba(19,19,31,.9) 60%);
  padding: 24px 20px 28px;
  position: relative;
  height: 156px;
}
.profile-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(124,58,237,.22), transparent);
  pointer-events: none;
}
.profile-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid transparent;
  outline: 2px solid rgba(168,85,247,.5);
  outline-offset: 3px;
  box-shadow: 0 0 25px rgba(124,58,237,.5), 0 0 60px rgba(124,58,237,.2);
  animation: avatarPulse 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes avatarPulse {
  0%,100% { outline-color: rgba(124,58,237,.4); box-shadow: 0 0 20px rgba(124,58,237,.4); }
  50%      { outline-color: rgba(192,132,252,.7); box-shadow: 0 0 35px rgba(168,85,247,.65), 0 0 70px rgba(124,58,237,.2); }
}
.avatar-edit-btn {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px;
  background: var(--purple-700);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: #fff;
  cursor: pointer;
  border: 2px solid var(--bg-card);
  transition: background var(--transition);
}
.avatar-edit-btn:hover { background: var(--purple-600); }
.profile-name {
  font-size: 1.3rem; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  text-align: center;
  background: linear-gradient(135deg, #fff, var(--purple-300));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.profile-username { color: var(--text-muted); font-size: .88rem; }
.profile-member-since { color: var(--text-muted); font-size: .78rem; }

.profile-sections { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.profile-card {
  background: rgba(26,20,50,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(100,70,180,.22);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.profile-card:hover {
  border-color: rgba(168,85,247,.35);
  box-shadow: 0 0 22px rgba(124,58,237,.12);
}
.profile-card-title {
  font-size: .8rem; font-weight: 600;
  color: var(--purple-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}

.invite-code-box {
  background: rgba(10,8,25,.7);
  border: 1px solid rgba(124,58,237,.35);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 0 20px rgba(124,58,237,.08);
}
.invite-code-text {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem; letter-spacing: 6px;
  color: var(--purple-300); font-weight: 700;
  text-shadow: 0 0 18px rgba(192,132,252,.65);
  user-select: all;
}
.code-share-hint { color: var(--text-muted); font-size: .78rem; margin-top: 8px; }

/* Share buttons row */
.invite-share-btns {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.invite-share-btn {
  flex: 1; min-width: 70px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 8px;
  background: rgba(20,16,40,.7);
  border: 1px solid rgba(100,70,180,.25);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .72rem; font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.invite-share-btn i { font-size: 1.25rem; }
.invite-share-btn:nth-child(1) i { color: #25d366; }
.invite-share-btn:nth-child(2) i { color: #2aabee; }
.invite-share-btn:nth-child(3) i { color: var(--purple-400); }
.invite-share-btn:nth-child(4) i { color: var(--text-secondary); }
.invite-share-btn:hover {
  background: rgba(124,58,237,.15);
  border-color: rgba(168,85,247,.4);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ============================================================
   BÓVEDA
   ============================================================ */
.vault-page { display: flex; flex-direction: column; overflow: hidden; }

.vault-stats {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}
.vault-stat {
  background: rgba(26,20,50,.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100,70,180,.22);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
  min-width: 90px;
  transition: border-color .2s ease;
}
.vault-stat:hover { border-color: rgba(168,85,247,.4); }
.vault-stat-num {
  font-size: 1.4rem; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--purple-300);
  text-shadow: 0 0 14px rgba(192,132,252,.55);
}
.vault-stat-label { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

.vault-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.vault-tab {
  flex: 1; padding: 10px 6px;
  text-align: center;
  font-size: .78rem; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.vault-tab.active {
  color: var(--purple-300);
  border-bottom-color: var(--purple-500);
  text-shadow: 0 0 10px rgba(192,132,252,.4);
}
.vault-tab:hover:not(.active) { color: var(--text-secondary); }

/* ── Buscador de grupos ───────────────────────────────── */
.group-search-wrap {
  display: flex; align-items: center; gap: 0;
  background: rgba(30,22,60,.7);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 12px;
  margin: 12px 12px 8px;
  padding: 0 10px;
  transition: border-color .2s, box-shadow .2s;
}
.group-search-wrap:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.group-search-icon {
  color: var(--text-muted); font-size: .82rem;
  flex-shrink: 0; pointer-events: none;
  transition: color .2s;
}
.group-search-wrap:focus-within .group-search-icon { color: var(--purple-300); }
.group-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: .87rem;
  padding: 9px 8px;
  min-width: 0;
}
.group-search-input::placeholder { color: var(--text-muted); }
.group-search-clear {
  background: none; border: none; padding: 4px 2px;
  color: var(--text-muted); cursor: pointer; font-size: .8rem;
  transition: color .15s;
}
.group-search-clear:hover { color: var(--text-primary); }
.group-section-label {
  font-size: .73rem; color: var(--text-muted);
  padding: 6px 12px 5px;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}

.vault-grid-wrap { flex: 1; overflow-y: auto; padding: 12px; }

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.vault-item {
  background: rgba(26,20,50,.6);
  border: 1px solid rgba(100,70,180,.22);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  position: relative;
  aspect-ratio: 1;
}
.vault-item:hover { border-color: rgba(168,85,247,.5); transform: scale(1.03); box-shadow: 0 0 18px rgba(124,58,237,.2); }
.vault-item img, .vault-item video {
  width: 100%; height: 100%; object-fit: cover;
}
.vault-item-del {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  background: rgba(0,0,0,.75); color: #f87171;
  border: none; border-radius: var(--radius-sm);
  padding: 4px 7px; font-size: .72rem; cursor: pointer;
  opacity: 0; transition: opacity var(--transition);
}
.vault-item-dl {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  background: rgba(0,0,0,.75); color: #a78bfa;
  border: none; border-radius: var(--radius-sm);
  padding: 4px 7px; font-size: .72rem; cursor: pointer;
  opacity: 0; transition: opacity var(--transition);
}
.vault-item:hover .vault-item-del { opacity: 1; }
.vault-item:hover .vault-item-dl  { opacity: 1; }

.vault-text-list { display: flex; flex-direction: column; gap: 10px; }
.vault-text-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
}
.vault-text-content {
  font-size: .9rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 80px;
  overflow: hidden;
}
.vault-text-date { font-size: .72rem; color: var(--text-muted); margin-top: 8px; }

.vault-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 200px;
  color: var(--text-muted);
  gap: 10px; font-size: .9rem;
}
.vault-empty i { font-size: 2.5rem; color: var(--border-light); }

/* ============================================================
   CHAT (AMIGOS)
   ============================================================ */
.friends-page { display: flex; flex-direction: row; height: 100%; overflow: hidden; }

/* Lista de chats */
.chat-list-panel {
  width: 100%; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: transform .25s ease;
}
.chat-list-panel.hidden { display: none; }
.chat-search-wrap { padding: 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-search {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 14px 9px 36px;
  color: var(--text-primary);
  font-size: .88rem; width: 100%; outline: none;
}
.chat-search-icon {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .85rem;
  pointer-events: none;
}
.chat-search-wrap { position: relative; }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
  border-bottom: 1px solid rgba(100,70,180,.15);
  position: relative;
}
.chat-item:hover, .chat-item.active {
  background: rgba(124,58,237,.08);
  border-bottom-color: rgba(124,58,237,.2);
}
.chat-item-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(124,58,237,.3);
  transition: border-color .18s ease;
}
.chat-item:hover .chat-item-avatar { border-color: rgba(168,85,247,.5); }
.online-dot {
  position: absolute; bottom: 12px; left: 44px;
  width: 10px; height: 10px;
  background: var(--success);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-card);
}
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-preview { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-item-time { font-size: .72rem; color: var(--text-muted); }
.chat-unread {
  background: var(--purple-600);
  color: #fff; border-radius: var(--radius-full);
  font-size: .65rem; font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* Ventana de chat */
.chat-window {
  display: none; flex-direction: column;
  width: 100%; height: 100%;
}
.chat-window.open { display: flex; }
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(124,58,237,.18);
  background: linear-gradient(90deg, rgba(124,58,237,.07), rgba(10,10,20,.8));
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.chat-header-back {
  font-size: 1.1rem; color: var(--text-muted);
  margin-right: 2px;
}
.chat-header-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #1a1a2e;
}
.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 700; font-size: .95rem; }
.chat-header-status { font-size: .75rem; color: var(--text-muted); }
.chat-header-actions { display: flex; gap: 4px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.msg-wrap {
  display: flex; gap: 8px; align-items: flex-end;
  max-width: 78%;
}
.msg-wrap.mine { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover; flex-shrink: 0;
}
.msg-bubble {
  background: var(--bg-msg-other);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  padding: 10px 14px;
  font-size: .9rem;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  max-width: 100%;
}
.msg-wrap.mine .msg-bubble {
  background: linear-gradient(135deg, #3b0f7a, #5b21b6);
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  box-shadow: 0 2px 14px rgba(124,58,237,.3);
}
.msg-time { font-size: .7rem; color: rgba(255,255,255,.4); margin-top: 4px; text-align: right; }
.msg-hidden-notice {
  font-size: .75rem; font-style: italic;
  color: var(--text-muted);
  padding: 6px 12px;
  background: var(--bg-panel);
  border-radius: var(--radius-full);
  align-self: center;
}
/* ── Etiqueta ver-una-vez ─────────────────────────────────── */
.msg-once-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(79,70,229,.25));
  border: 1px solid rgba(124,58,237,.45);
  border-radius: 20px;
  font-size: .85rem; font-weight: 600; color: #c4b5fd;
  cursor: pointer; user-select: none;
  transition: background .18s, border-color .18s;
}
.msg-once-tag:hover {
  background: linear-gradient(135deg, rgba(124,58,237,.4), rgba(79,70,229,.4));
  border-color: rgba(124,58,237,.75);
}
.msg-once-tag.mine-sent {
  cursor: default;
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  color: var(--text-muted);
}
.msg-seen-notice {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  font-size: .8rem; color: var(--text-muted); font-style: italic;
}
/* ── Bloqueado hasta enviar media ───────────────────── */
.msg-exchange-lock {
  display: flex; flex-direction: column; gap: 5px;
  padding: 12px 16px;
  background: rgba(245,158,11,.07);
  border: 1px dashed rgba(245,158,11,.4);
  border-radius: 14px; cursor: pointer;
  font-size: .85rem; color: #fcd34d;
  transition: background .18s;
}
.msg-exchange-lock:hover { background: rgba(245,158,11,.14); }
.msg-exchange-lock i.fa-lock { font-size: 1.1rem; margin-bottom: 2px; }
.msg-exchange-hint { font-size: .75rem; color: rgba(252,211,77,.6); }
/* ── Pill del remitente para foto×foto pendiente ──── */
.msg-once-tag.mine-exchange {
  background: rgba(167,139,250,.12);
  border: 1px dashed rgba(167,139,250,.4);
  color: #c4b5fd;
  gap: 7px;
}
.msg-once-tag.mine-exchange:hover { background: rgba(167,139,250,.22); }
/* ── Aviso de una sola vez ──────────────────────────── */
.msg-media-notice {
  font-size: .7rem; color: rgba(255,255,255,.3);
  margin-top: 4px;
  display: flex; align-items: center; gap: 5px;
}
/* ─────────────────────────────────────────────────────────── */
.msg-media {
  max-width: 200px; max-height: 200px;
  border-radius: var(--radius);
  object-fit: cover; cursor: pointer;
  display: block;
}
.msg-seen-once {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius);
  font-size: .82rem; color: var(--purple-300);
  cursor: pointer;
}

.chat-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(124,58,237,.18);
  background: rgba(8,8,18,.82);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(10,8,22,.7);
  border: 1px solid rgba(100,70,180,.3);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: .9rem;
  resize: none;
  max-height: 120px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  min-height: 42px;
  line-height: 1.4;
}
.chat-input:focus {
  border-color: rgba(168,85,247,.55);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-media-btn { color: var(--text-muted); font-size: 1.1rem; padding: 9px; }
.chat-media-btn:hover { color: var(--purple-400); }
.chat-exchange-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: .95rem; padding: 6px 8px; cursor: pointer;
  border-radius: 8px; transition: color .18s, background .18s;
  flex-shrink: 0;
}
.chat-exchange-btn:hover { color: var(--purple-400); background: rgba(124,58,237,.1); }
.chat-exchange-btn.active { color: #a78bfa; background: rgba(124,58,237,.2); }

/* Bandeja de invitaciones */
.inbox-panel { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.inbox-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.inbox-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.inbox-item-msg {
  font-size: .88rem; color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border-left: 3px solid var(--purple-700);
}
.inbox-actions { display: flex; gap: 8px; }

/* ============================================================
   CANALES
   ============================================================ */
.channels-page { display: flex; flex-direction: row; height: 100%; overflow: hidden; }

.channels-list-panel {
  width: 100%; flex-shrink: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.channel-grid-wrap { flex: 1; overflow-y: auto; padding: 10px; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }

.channel-card {
  background: rgba(22,16,44,.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100,70,180,.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all .22s ease;
  position: relative;
}
.channel-card:hover {
  border-color: rgba(168,85,247,.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,.4), 0 0 20px rgba(124,58,237,.15);
}
.channel-card-img {
  width: 100%; aspect-ratio: 1/1;
  background: linear-gradient(135deg, var(--bg-hover), var(--bg-panel));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--purple-400);
  overflow: hidden;
}
.channel-card-img img { width: 100%; height: 100%; object-fit: cover; }
.channel-card-body { padding: 7px 8px 4px; }
.channel-card-name { font-weight: 700; font-size: .78rem; margin-bottom: 2px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.channel-card-desc { font-size: .65rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 8px;
  border-top: 1px solid var(--border);
  font-size: .65rem;
}
.channel-free-badge {
  background: rgba(16,185,129,.15); color: #34d399;
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-full);
  padding: 2px 8px; font-size: .7rem; font-weight: 600;
}
.channel-price-badge {
  display: flex; align-items: center; gap: 4px;
  color: var(--warning); font-weight: 600;
}
.channel-joined-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--purple-700); color: #fff;
  border-radius: var(--radius-full);
  padding: 2px 8px; font-size: .65rem; font-weight: 700;
}

.channel-window {
  display: none; flex-direction: column;
  width: 100%; height: 100%;
}
.channel-window.open { display: flex; }

/* Locked media in channel */
.msg-media-locked {
  position: relative;
  display: inline-block;
  width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.msg-media-locked-img {
  width: 100%; height: 140px;
  object-fit: cover;
  filter: blur(14px) brightness(.4);
  display: block;
}
.msg-media-locked-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  background: rgba(10,6,22,.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(124,58,237,.35);
  border-radius: var(--radius);
}
.msg-media-locked-overlay i {
  font-size: 1.6rem; color: var(--purple-300);
  filter: drop-shadow(0 0 8px rgba(192,132,252,.6));
}
.msg-media-locked-overlay span {
  font-size: .72rem; color: var(--text-secondary);
  text-align: center; padding: 0 10px; line-height: 1.4;
}
.msg-media-locked-overlay .btn-unlock {
  background: linear-gradient(135deg, rgba(124,58,237,.4), rgba(168,85,247,.3));
  border: 1px solid rgba(168,85,247,.4);
  border-radius: var(--radius-full);
  color: var(--purple-200);
  font-size: .7rem; font-weight: 700;
  padding: 4px 12px; cursor: pointer;
  transition: all .18s ease;
  margin-top: 2px;
}
.msg-media-locked-overlay .btn-unlock:hover {
  background: linear-gradient(135deg, rgba(124,58,237,.6), rgba(168,85,247,.5));
  box-shadow: 0 0 12px rgba(168,85,247,.4);
}

/* Clickable channel sender */
.channel-sender-link {
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.channel-sender-link:hover { color: var(--purple-300); }

.channel-msg-bubble {
  background: var(--bg-msg-other);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  padding: 8px 12px;
  font-size: .88rem;
  word-break: break-word;
}
.channel-sender-name {
  font-size: .72rem; font-weight: 600;
  color: var(--purple-400); margin-bottom: 3px;
}

/* ============================================================
   MEDIA VIEWER (pantalla completa)
   ============================================================ */
.media-viewer {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.96);
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
}
.media-viewer.open { display: flex; }
.media-viewer-close {
  position: absolute; top: 16px; right: 16px;
  color: #fff; font-size: 1.5rem;
  opacity: .7; transition: opacity var(--transition);
  z-index: 1;
}
.media-viewer-close:hover { opacity: 1; }
.media-viewer img, .media-viewer video {
  max-width: 95vw; max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.media-viewer-notice {
  margin-top: 12px;
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  text-align: center;
}
.media-viewer-actions {
  display: flex; gap: 12px; margin-top: 16px;
  width: 100%; max-width: 420px; padding: 0 16px;
  box-sizing: border-box;
}
.mv-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 0; border-radius: 12px; font-size: .95rem; font-weight: 600;
  border: none; cursor: pointer; transition: opacity .18s, transform .15s;
}
.mv-btn:hover  { opacity: .85; transform: translateY(-1px); }
.mv-btn:active { transform: translateY(0); }
.mv-btn-dl  { background: linear-gradient(135deg,#7c3aed,#4f46e5); color: #fff; }
.mv-btn-del { background: rgba(239,68,68,.18); border: 1px solid rgba(239,68,68,.4); color: #f87171; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 250px; overflow-y: auto;
  margin-top: 4px;
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item img {
  width: 34px; height: 34px; border-radius: var(--radius-full); object-fit: cover;
}
.search-result-name { font-size: .9rem; font-weight: 500; }

/* ============================================================
   ADMIN PANEL (basic styles, full in app_admin.css)
   ============================================================ */
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 240px; background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 0;
  z-index: 50;
}
.admin-logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.admin-logo span { font-size: .75rem; color: var(--text-muted); display: block; margin-top: 4px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-nav-item i { width: 18px; text-align: center; }
.admin-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.admin-nav-item.active {
  background: rgba(124,58,237,.1);
  border-left-color: var(--purple-600);
  color: var(--purple-400);
}
.admin-main { margin-left: 240px; padding: 28px; min-height: 100vh; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-num { font-size: 2rem; font-weight: 700; color: var(--purple-400); }
.stat-label { color: var(--text-muted); font-size: .82rem; margin-top: 4px; }
.stat-icon { font-size: 1.5rem; color: var(--border-light); float: right; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--bg-hover); }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.p-4 { padding: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .82rem; }
.text-purple { color: var(--purple-400); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.rounded-full { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-hover) 50%, var(--bg-panel) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--purple-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast notifications */
#toastContainer {
  position: fixed; bottom: calc(var(--tabbar-h) + 12px); left: 50%;
  transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; min-width: 280px; max-width: 90vw;
}
.toast {
  background: rgba(12,10,24,.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(100,70,180,.3);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  font-size: .88rem;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s cubic-bezier(.34,1.3,.64,1);
  pointer-events: all;
}
.toast.success { border-color: rgba(16,185,129,.5); box-shadow: 0 4px 20px rgba(16,185,129,.15); }
.toast.error   { border-color: rgba(239,68,68,.5);  box-shadow: 0 4px 20px rgba(239,68,68,.15); }
.toast.info    { border-color: rgba(124,58,237,.5); box-shadow: 0 4px 20px rgba(124,58,237,.15); }
.toast-icon.success { color: var(--success); }
.toast-icon.error   { color: var(--error); }
.toast-icon.info    { color: var(--purple-400); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE — Desktop
   ============================================================ */
@media (min-width: 768px) {
  .chat-list-panel { width: 300px; }
  .chat-list-panel.hidden { display: flex; }
  .chat-window { width: calc(100% - 300px); }
  .chat-header-back { display: none; }

  .channels-list-panel { width: 300px; }
  .channels-list-panel.hidden { display: flex; }
  .channel-window { width: calc(100% - 300px); }

  #toastContainer { bottom: 20px; left: auto; right: 20px; transform: none; }
}

@media (min-width: 1024px) {
  .auth-card { padding: 44px 40px; }
  .channel-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .vault-grid   { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ============================================================
   ADMIN — RESPONSIVE
   ============================================================ */

/* Hamburger button — hidden on desktop */
.admin-hamburger {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 200;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: background var(--transition);
}
.admin-hamburger:hover { background: var(--bg-hover); }

/* Backdrop overlay */
.admin-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.admin-sidebar-overlay.open { display: block; }

/* Admin stats grid — desktop 4 cols already via auto-fill */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card.stat-danger { border-color: rgba(239,68,68,.4); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; float: none; margin-bottom: 4px;
}
.stat-info { display: flex; flex-direction: column; gap: 2px; }
.stat-num  { font-size: 1.8rem; font-weight: 700; color: var(--purple-400); line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .8rem; }
.stat-sub   { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* Admin card */
.admin-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .9rem;
  gap: 8px; flex-wrap: wrap;
}

/* Admin table with scroll */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
  white-space: nowrap;
}
.admin-table th {
  background: var(--bg-hover); color: var(--text-secondary);
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-hover); }

/* Page top-bar on mobile */
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.admin-topbar h1 { font-size: 1.3rem; font-weight: 700; }

/* --- MOBILE breakpoint --- */
@media (max-width: 767px) {
  /* Show hamburger */
  .admin-hamburger { display: flex; }

  /* Sidebar becomes a drawer */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 100;
    width: 260px;
    box-shadow: 4px 0 30px rgba(0,0,0,.5);
  }
  .admin-sidebar.open { transform: translateX(0); }

  /* Main content fills full width */
  .admin-main {
    margin-left: 0 !important;
    padding: 16px 14px;
    padding-top: 64px; /* space for hamburger btn */
  }

  /* body flex on mobile */
  body { display: block !important; overflow-y: auto !important; }

  /* Stats: 2 columns */
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-num { font-size: 1.5rem; }

  /* Two-col grids → single column */
  .admin-two-col { grid-template-columns: 1fr !important; }

  /* Cards padding */
  .admin-card-header { padding: 12px 14px; font-size: .85rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; font-size: .8rem; }

  /* Top bar */
  .admin-topbar h1 { font-size: 1.1rem; }

  /* Wrap action buttons */
  .admin-actions { flex-wrap: wrap; gap: 8px; }
}
/* ============================================================
   GAMES — Verdad o Se Atreve
   ============================================================ */

/* Allow the whole tab to scroll (overrides overflow:hidden on .tab-content) */
.games-page {
  overflow-y: auto;
}
#gamesListScreen,
#gamesDetailScreen {
  flex: 1;
  padding: 0 16px 24px;
}

/* ── Misc helpers ─────────────────────────────────────────── */
.game-section-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Game card (list) ─────────────────────────────────────── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  margin-bottom: 10px;
}
.game-card:hover { background: var(--bg-hover); border-color: var(--border-light); }

.game-card-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; flex-shrink: 0;
}
.game-card-body { flex: 1; min-width: 0; }
.game-card-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-meta { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }

/* Status colored labels */
.gcS-wait   { color: #f59e0b; }
.gcS-active { color: #4ade80; }
.gcS-done   { color: var(--text-muted); }

/* ── Badges ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.badge-ok    { background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.3); }
.badge-error { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.3); }
.badge-info  { background: rgba(96,165,250,.15); color: #60a5fa; border: 1px solid rgba(96,165,250,.3); }
.badge-warn  { background: rgba(245,158,11,.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }

/* Game upload area */
.game-upload-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px; padding: 20px 16px;
  background: rgba(22,16,44,.6);
  border: 2px dashed rgba(124,58,237,.35);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  user-select: none;
}
.game-upload-area:hover {
  border-color: var(--purple-400);
  background: rgba(124,58,237,.08);
}

/* ── Detail header ─────────────────────────────────────────── */
.game-detail-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.game-detail-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }

.game-status-badge {
  font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 99px;
}
.game-status-waiting  { background: rgba(245,158,11,.15); color:#f59e0b; border:1px solid rgba(245,158,11,.3); }
.game-status-active   { background: rgba(74,222,128,.15);  color:#4ade80; border:1px solid rgba(74,222,128,.3); }
.game-status-finished { background: rgba(161,161,170,.1);  color:#a1a1aa; border:1px solid rgba(161,161,170,.2); }
.game-status-cancelled{ background: rgba(248,113,113,.1);  color:#f87171; border:1px solid rgba(248,113,113,.2); }

/* ── Players row ───────────────────────────────────────────── */
.game-players-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.game-player-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 10px 4px 4px;
  font-size: .78rem;
}
.game-player-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.game-player-chip.expelled { opacity: .45; text-decoration: line-through; }

/* ── Invite card ───────────────────────────────────────────── */
.game-invite-card {
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(168,85,247,.08));
  border: 1px solid var(--purple-700);
  border-radius: 16px; padding: 24px; text-align: center; margin: 10px 0;
}
.game-invite-icon { font-size: 2.4rem; color: var(--purple-400); margin-bottom: 10px; }

/* Terms list inside invite card / popup */
.game-invite-terms {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .84rem;
  line-height: 1.45;
}
.git-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.git-row i {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  text-align: center;
}

/* ── Fill content form ─────────────────────────────────────── */
.game-fill-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.game-fill-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.fill-item { margin-bottom: 14px; }
.fill-item-label { font-size: .78rem; font-weight: 700; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.fill-item-truth { --border-color: rgba(192,132,252,.35); }
.fill-item-photo { --border-color: rgba(74,222,128,.35); }
.fill-item-video { --border-color: rgba(245,158,11,.35); }
.fill-item textarea { border-color: var(--border-color, var(--border)); }

/* ── Participants status ───────────────────────────────────── */
.game-participants-status { display: flex; flex-direction: column; gap: 8px; }
.gp-status-row { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--bg-panel); border-radius: 10px; }

.game-ready-status {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: #4ade80;
  background: rgba(74,222,128,.07); border: 1px solid rgba(74,222,128,.2);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
}

/* ── Wheel ─────────────────────────────────────────────────── */
.wheel-container {
  position: relative; width: 220px; height: 220px;
  margin: 0 auto 20px;
}
.wheel {
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 4px solid var(--border);
  box-shadow: 0 0 30px rgba(192,132,252,.2);
}
/* 4 quadrants drawn with clip-path */
.wheel-seg {
  position: absolute; width: 50%; height: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700; color: #fff; gap: 3px;
}
.wheel-seg i { font-size: 1.1rem; }
.ws-truth  { top: 0;   left: 50%; background: #7c3aed; }   /* top-right */
.ws-photo  { top: 50%; left: 50%; background: #059669; }   /* bottom-right */
.ws-video  { top: 50%; left: 0;   background: #b45309; }   /* bottom-left */
.ws-none   { top: 0;   left: 0;   background: #374151; }   /* top-left */

.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 20px solid #f1f0ff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
  z-index: 10;
}
.wheel-spin-btn {
  position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}

.game-my-turn-card { padding-bottom: 60px; }

/* ── Turn result reveal ────────────────────────────────────── */
.game-turn-result { animation: fadeInUp .4s ease; }
.game-turn-result.hidden { display: none; }
.turn-result-badge {
  font-size: 1.2rem; font-weight: 800; text-align: center;
  padding: 14px; border-radius: 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.turn-result-truth      { background: rgba(124,58,237,.2); color: #c084fc; border: 1px solid rgba(124,58,237,.4); }
.turn-result-dare_photo { background: rgba(5,150,105,.15); color: #34d399; border: 1px solid rgba(5,150,105,.3); }
.turn-result-dare_video { background: rgba(180,83,9,.15);  color: #fbbf24; border: 1px solid rgba(180,83,9,.3); }
.turn-result-none       { background: rgba(55,65,81,.2);   color: #9ca3af; border: 1px solid rgba(55,65,81,.4); }

.turn-content-box {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.turn-content-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 6px; }
.turn-content-text  { font-size: .9rem; line-height: 1.5; }

.turn-expires { font-size: .74rem; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* ── Observer card ─────────────────────────────────────────── */
.game-observer-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; margin-bottom: 10px;
}
.turn-type-pill {
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  display: flex; align-items: center; gap: 5px;
}
.turn-type-truth      { background: rgba(124,58,237,.15); color:#c084fc; }
.turn-type-dare_photo { background: rgba(5,150,105,.12);  color:#34d399; }
.turn-type-dare_video { background: rgba(180,83,9,.12);   color:#fbbf24; }
.turn-type-none       { background: rgba(55,65,81,.15);   color:#9ca3af; }

.turn-response-display {
  background: var(--bg-hover); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 12px; margin-top: 10px;
}
.turn-media-reveal { margin-top: 10px; }
.turn-media-seen, .turn-blocked-media { font-size: .8rem; color: var(--text-muted); padding: 8px 0; }
.turn-blocked-media { color: #f87171; }

/* ── History ───────────────────────────────────────────────── */
.game-history-list { display: flex; flex-direction: column; gap: 8px; }
.game-history-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  font-size: .82rem;
}
.ghi-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.ghi-date   { font-size: .7rem; color: var(--text-muted); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.ghi-question { color: var(--text-secondary); margin-bottom: 4px; }
.ghi-response { color: var(--text-muted); font-style: italic; }
.ghi-media { margin-top: 6px; }

/* ── Banners ───────────────────────────────────────────────── */
.game-finished-banner {
  background: rgba(74,222,128,.07); border: 1px solid rgba(74,222,128,.2);
  border-radius: 12px; padding: 14px 16px; text-align: center; font-size: .9rem;
  color: #4ade80; margin-bottom: 14px;
}
.game-blocked-banner {
  background: rgba(248,113,113,.07); border: 1px solid rgba(248,113,113,.2);
  border-radius: 12px; padding: 12px 14px; text-align: center; font-size: .85rem;
  color: #f87171; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; justify-content: center;
}

/* ── Create game popup ─────────────────────────────────────── */
.game-friend-check {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.game-friend-check:hover { background: var(--bg-hover); }
.game-friend-check input { accent-color: var(--purple-500); width: 16px; height: 16px; flex-shrink: 0; }

/* ── Tab badge hidden util ─────────────────────────────────── */
.tab-badge.hidden { display: none; }

/* ── Spinner utility ───────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--purple-400); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .wheel-container { width: 180px; height: 180px; }
  .wheel { width: 180px; height: 180px; }
}