/* ============================================================
   WEBBURNS CHAT — THEMES
   Dark/Light modes + custom theme presets
   ============================================================ */

/* ── Auth Screens ──────────────────────────────────────────── */
.auth-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; position: relative; overflow: hidden;
  background: var(--color-base-900);
}

.auth-screen::before {
  content: ''; position: absolute; inset: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(102,126,234,0.12) 0%, transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(118,75,162,0.12) 0%, transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(79,172,254,0.06) 0%, transparent 60%);
  animation: bgPulse 15s ease-in-out infinite;
}

.auth-card {
  position: relative; width: 100%; max-width: 440px; margin: 16px;
  padding: 40px 36px; border-radius: var(--radius-xl);
  background: rgba(18,18,30,0.8);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  animation: fadeInUp .6s var(--ease-out);
}

.auth-card::before {
  content: ''; position: absolute; inset: -2px;
  background: var(--gradient-primary); border-radius: calc(var(--radius-xl) + 2px);
  z-index: -1; opacity: 0; transition: opacity .4s ease;
}
.auth-card:hover::before { opacity: 0.4; }

.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-logo-icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: var(--text-2xl); color: #fff;
  box-shadow: var(--shadow-glow);
}
.auth-logo h1 {
  font-size: var(--text-2xl); font-weight: 800;
  background: var(--gradient-primary); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo p { color: var(--color-base-200); font-size: var(--text-sm); margin-top: 4px; }

.auth-tabs {
  display: flex; gap: 0; margin-bottom: 28px;
  background: var(--color-base-700); border-radius: var(--radius-md); padding: 3px;
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-size: var(--text-sm); font-weight: 600;
  border-radius: var(--radius-sm); color: var(--color-base-200);
  transition: all var(--dur-normal) var(--ease-out); cursor: pointer;
}
.auth-tab.active {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 2px 12px rgba(102,126,234,0.3);
}

.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--color-base-400); font-size: var(--text-xs);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }

.auth-social-btns { display: flex; gap: 10px; margin-bottom: 4px; }
.auth-social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius-md);
  background: var(--color-base-700); border: 1px solid var(--glass-border);
  color: var(--color-base-white); font-size: var(--text-sm); font-weight: 600;
  transition: all var(--dur-normal) var(--ease-out);
}
.auth-social-btn:hover { background: var(--color-base-600); border-color: var(--glass-border-hover); transform: translateY(-1px); }
.auth-social-btn.google i { color: #ea4335; }
.auth-social-btn.anonymous i { color: var(--color-base-100); }

/* ── Settings Panel ────────────────────────────────────────── */
.settings-panel {
  position: fixed; inset: 0;
  background: var(--color-base-900);
  z-index: var(--z-modal);
  display: flex;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.settings-panel.open { transform: translateX(0); }

.settings-sidebar {
  width: 240px; background: var(--color-base-800);
  border-right: 1px solid var(--glass-border);
  padding: 16px; overflow-y: auto;
}

.settings-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--color-base-200);
  cursor: pointer; transition: all var(--dur-fast);
}
.settings-nav-item:hover { background: var(--color-base-700); color: #fff; }
.settings-nav-item.active { background: var(--color-base-600); color: #fff; }

.settings-content {
  flex: 1; padding: 40px; overflow-y: auto; max-width: 740px;
}

.settings-section { margin-bottom: 40px; }
.settings-section h2 { font-size: var(--text-xl); font-weight: 700; margin-bottom: 8px; }
.settings-section p { color: var(--color-base-200); font-size: var(--text-sm); margin-bottom: 20px; }

.settings-profile-header {
  display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .settings-profile-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .settings-profile-header .avatar.xl { width: 60px; height: 60px; font-size: var(--text-xl); }
}

.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--glass-border);
}
.settings-row-label { font-size: var(--text-sm); font-weight: 500; }
.settings-row-desc { font-size: var(--text-xs); color: var(--color-base-400); margin-top: 2px; }

.settings-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-base-200); font-size: var(--text-lg);
  transition: all var(--dur-fast);
}
.settings-close:hover { background: var(--color-base-700); color: #fff; }

/* ── Theme Presets ─────────────────────────────────────────── */
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px; margin-top: 12px;
}
.theme-card {
  padding: 16px; border-radius: var(--radius-md);
  border: 2px solid var(--glass-border);
  cursor: pointer; text-align: center;
  transition: all var(--dur-normal) var(--ease-out);
}
.theme-card.active { border-color: var(--accent-indigo); box-shadow: 0 0 15px rgba(102,126,234,0.2); }
.theme-card:hover { border-color: var(--glass-border-hover); }
.theme-card-colors {
  display: flex; gap: 4px; margin-bottom: 8px; justify-content: center;
}
.theme-swatch {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1);
}
.theme-card-name { font-size: var(--text-xs); font-weight: 600; }

/* ── Light Mode ────────────────────────────────────────────── */
[data-theme="light"] {
  --color-base-900: #ffffff;
  --color-base-800: #f7f7fa;
  --color-base-750: #f0f0f5;
  --color-base-700: #e8e8f0;
  --color-base-600: #d5d5e2;
  --color-base-500: #c0c0d0;
  --color-base-400: #9090a5;
  --color-base-200: #606075;
  --color-base-100: #404055;
  --color-base-50: #252535;
  --color-base-white: #1a1a2e;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-bg-heavy: rgba(245,245,250,0.9);
  --glass-bg-subtle: rgba(255,255,255,0.4);
  --glass-bg-card: rgba(250,250,255,0.8);
  --glass-border: rgba(0,0,0,0.08);
  --glass-border-hover: rgba(0,0,0,0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(102,126,234,0.15);
}

/* ── Custom Theme: Midnight Ocean ──────────────────────────── */
[data-theme="ocean"] {
  --accent-indigo: #0ea5e9;
  --accent-violet: #6366f1;
  --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --shadow-glow: 0 0 20px rgba(14,165,233,0.3);
}

/* ── Custom Theme: Sunset ──────────────────────────────────── */
[data-theme="sunset"] {
  --accent-indigo: #f97316;
  --accent-violet: #ef4444;
  --gradient-primary: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --shadow-glow: 0 0 20px rgba(249,115,22,0.3);
}

/* ── Custom Theme: Neon ────────────────────────────────────── */
[data-theme="neon"] {
  --accent-indigo: #a855f7;
  --accent-violet: #ec4899;
  --gradient-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --shadow-glow: 0 0 20px rgba(168,85,247,0.3);
}

/* ── Custom Theme: Forest ──────────────────────────────────── */
[data-theme="forest"] {
  --accent-indigo: #10b981;
  --accent-violet: #059669;
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --shadow-glow: 0 0 20px rgba(16,185,129,0.3);
}

/* ── Profile Card Popup ────────────────────────────────────── */
.profile-popup {
  position: fixed;
  width: 340px;
  background: var(--color-base-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-popover);
  overflow: hidden;
  animation: fadeInScale .2s var(--ease-out);
}
.profile-banner {
  height: 80px;
  background: var(--gradient-primary);
}
.profile-popup-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gradient-aurora);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl); font-weight: 800; color: #fff;
  border: 4px solid var(--color-base-800);
  margin: -36px 0 0 20px; position: relative;
}
.profile-popup-body { padding: 12px 20px 20px; }
.profile-popup-name { font-size: var(--text-lg); font-weight: 700; }
.profile-popup-tag { font-size: var(--text-sm); color: var(--color-base-200); }
.profile-popup-bio { font-size: var(--text-sm); color: var(--color-base-100); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-border); }

/* ── Call Overlay ──────────────────────────────────────────── */
.call-overlay {
  position: fixed; inset: 0;
  background: var(--color-base-900);
  z-index: var(--z-modal);
  display: flex; flex-direction: column;
  animation: fadeIn .3s var(--ease-out);
}
.call-videos {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; padding: 16px;
}
.call-video-wrapper {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--color-base-800);
  border: 1px solid var(--glass-border);
}
.call-video-wrapper video {
  width: 100%; height: 100%; object-fit: cover; min-height: 200px;
}
.call-video-label {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  padding: 4px 12px; border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: 600; color: #fff;
}
.call-controls {
  display: flex; justify-content: center; gap: 12px;
  padding: 16px; background: rgba(0,0,0,.3);
}
.call-ctrl-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-base-700); border: 1px solid var(--glass-border);
  color: #fff; font-size: var(--text-lg);
  transition: all var(--dur-normal) var(--ease-out);
}
.call-ctrl-btn:hover { background: var(--color-base-600); }
.call-ctrl-btn.active { background: var(--accent-indigo); border-color: transparent; }
.call-ctrl-btn.muted { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.4); color: var(--color-danger); }
.call-ctrl-btn.end-call {
  width: 60px; height: 60px; background: var(--gradient-danger);
  border: none; box-shadow: 0 4px 20px rgba(239,68,68,.4);
}
.call-ctrl-btn.end-call:hover { transform: scale(1.05); }