@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --bg: #09090b;
  --bg-2: #0f0f12;
  --bg-3: #141418;
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(192,132,252,0.3);
  --primary: #c084fc;
  --primary-dark: #a855f7;
  --accent: #ec4899;
  --accent-glow: rgba(236,72,153,0.3);
  --primary-glow: rgba(192,132,252,0.25);
  --text: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xl: 24px;
  --shadow: 0 4px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(192,132,252,0.15);
  --transition: cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.3); border-radius: 3px; }

/* ---- NOISE TEXTURE OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--card); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(192,132,252,0.4); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--card); }

.btn-ghost { background: var(--card); color: var(--text-2); }
.btn-ghost:hover { background: var(--card-hover); color: var(--text); }

.btn-danger { background: rgba(248,113,113,0.15); color: var(--error); border: 1px solid rgba(248,113,113,0.2); }
.btn-danger:hover { background: rgba(248,113,113,0.25); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: var(--radius); }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: all 0.2s var(--transition);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.card-pad { padding: 24px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: all 0.2s var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  background: rgba(192,132,252,0.06);
  box-shadow: 0 0 0 3px rgba(192,132,252,0.12);
}
.form-control::placeholder { color: var(--text-3); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }

.form-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 6px; }

/* Range slider */
input[type=range] {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px var(--primary-glow);
  cursor: pointer;
}

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle {
  position: relative;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- ALERT ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); color: var(--error); }
.alert-success { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.2); color: var(--success); }
.alert-info { background: rgba(192,132,252,0.1); border-color: rgba(192,132,252,0.2); color: var(--primary); }

/* ---- BADGE ---- */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-premium { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.badge-free { background: rgba(161,161,170,0.15); color: var(--text-2); }

/* ---- PAGE WRAPPER ---- */
.page { min-height: 100vh; padding-top: 64px; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ---- HERO ---- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero-glow-1 {
  background: radial-gradient(circle, rgba(192,132,252,0.2) 0%, transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
}
.hero-glow-2 {
  background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, transparent 70%);
  bottom: -200px; left: 30%;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(192,132,252,0.1);
  border: 1px solid rgba(192,132,252,0.2);
  color: var(--primary);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--primary) 60%, var(--accent) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- FEATURES ---- */
.features { padding: 100px 24px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub { font-size: 17px; color: var(--text-2); max-width: 500px; line-height: 1.7; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 60px;
}
.feature-card {
  padding: 28px;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(192,132,252,0.2), rgba(236,72,153,0.15));
  border: 1px solid rgba(192,132,252,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.feature-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ---- PRICING ---- */
.pricing { padding: 100px 24px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 60px auto 0;
}
.pricing-card {
  padding: 32px;
  text-align: center;
  position: relative;
}
.pricing-card.featured {
  border-color: rgba(192,132,252,0.3);
  background: rgba(192,132,252,0.06);
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 14px; border-radius: 20px; color: #fff;
}
.price-amount { font-size: 48px; font-weight: 800; font-family: 'Syne', sans-serif; }
.price-amount span { font-size: 20px; font-weight: 500; color: var(--text-2); }
.price-period { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.price-features { list-style: none; text-align: left; margin-bottom: 28px; }
.price-features li {
  font-size: 14px; color: var(--text-2);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.price-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ---- AUTH PAGES ---- */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-glow {
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.auth-glow-1 { background: rgba(192,132,252,0.15); top: -150px; right: -100px; }
.auth-glow-2 { background: rgba(236,72,153,0.1); bottom: -150px; left: -100px; }

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  position: relative; z-index: 1;
  animation: slideUp 0.4s var(--transition);
}
.auth-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 8px;
}
.auth-sub { text-align: center; color: var(--text-2); font-size: 15px; margin-bottom: 32px; }
.auth-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; text-align: center; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 20px; }
.auth-switch a { color: var(--primary); font-weight: 500; }

/* ---- DASHBOARD / APP LAYOUT ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}
.sidebar {
  width: 260px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 16px;
  position: fixed; top: 64px; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s var(--transition);
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  padding: 0 12px;
  margin-bottom: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--card); color: var(--text); }
.sidebar-link.active { background: rgba(192,132,252,0.12); color: var(--primary); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.main-content { flex: 1; margin-left: 260px; padding: 32px; }

/* ---- CHAT PAGE ---- */
.chat-layout {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.chat-sidebar {
  width: 280px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.girlfriend-list { flex: 1; overflow-y: auto; padding: 8px; }
.girlfriend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.girlfriend-item:hover { background: var(--card); }
.girlfriend-item.active { background: rgba(192,132,252,0.1); }
.gf-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.gf-avatar.online { border-color: var(--success); box-shadow: 0 0 8px rgba(74,222,128,0.4); }
.gf-name { font-weight: 600; font-size: 14px; }
.gf-preview { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(74,222,128,0.6);
  position: absolute; bottom: 14px; left: 42px;
  border: 2px solid var(--bg-2);
}

.chat-main {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  background: rgba(9,9,11,0.9);
  backdrop-filter: blur(10px);
}
.chat-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-header-name { font-weight: 700; font-size: 16px; }
.chat-header-status { font-size: 12px; color: var(--success); display: flex; align-items: center; gap: 5px; }
.chat-header-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

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

.msg-row { display: flex; gap: 10px; max-width: 75%; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.assistant { align-self: flex-start; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; align-self: flex-end; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  animation: msgIn 0.2s var(--transition);
}
.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-row.assistant .msg-bubble {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}
.msg-time { font-size: 11px; color: var(--text-3); text-align: right; margin-top: 4px; }

.typing-indicator {
  display: flex; gap: 4px; align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(9,9,11,0.95);
}
.chat-input-row {
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 12px 18px;
  outline: none;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: rgba(192,132,252,0.4); }
.chat-input::placeholder { color: var(--text-3); }

.send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.send-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(192,132,252,0.4); }
.send-btn:active { transform: scale(0.96); }
.send-btn svg { width: 18px; height: 18px; fill: #fff; }

.msg-limit-bar {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.msg-limit-bar .limit-fill {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.3s;
}
.msg-limit-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

/* ---- CREATE GIRLFRIEND ---- */
.create-layout {
  max-width: 760px; margin: 0 auto;
  padding: 40px 24px;
}
.create-section {
  margin-bottom: 32px;
}
.create-section-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.avatar-upload {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 24px;
}
.avatar-preview {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  background: var(--card);
}
.avatar-upload-btn { position: relative; }
.avatar-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.pill-select {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.selected { background: rgba(192,132,252,0.15); border-color: var(--primary); color: var(--primary); }

/* ---- PREMIUM PAGE ---- */
.premium-hero { text-align: center; padding: 80px 24px 60px; }
.crown-icon { font-size: 60px; margin-bottom: 20px; }
.premium-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}
.premium-feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.premium-feature-icon { font-size: 32px; margin-bottom: 12px; }
.premium-feature-title { font-weight: 700; margin-bottom: 6px; }
.premium-feature-desc { font-size: 13px; color: var(--text-2); }

/* ---- ADMIN PANEL ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 50;
}
.admin-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 32px;
}
.admin-main { margin-left: 240px; padding: 32px; flex: 1; }
.admin-header { margin-bottom: 32px; }
.admin-title { font-size: 28px; font-weight: 800; }
.admin-sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { padding: 24px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); margin-bottom: 8px; }
.stat-value { font-size: 36px; font-weight: 800; font-family: 'Syne', sans-serif; }
.stat-change { font-size: 12px; color: var(--success); margin-top: 4px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-2);
}
tr:hover td { background: var(--card); }
.td-primary { color: var(--text); font-weight: 500; }

/* ---- PROFILE ---- */
.profile-header {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 32px; margin-bottom: 24px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; font-family: 'Syne', sans-serif;
  flex-shrink: 0;
}

/* ---- ANIMATIONS ---- */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(192,132,252,0.3); }
  50% { box-shadow: 0 0 40px rgba(192,132,252,0.6); }
}

.animate-fade { animation: fadeIn 0.4s ease; }
.animate-slide { animation: slideUp 0.4s var(--transition); }

/* ---- GRID HELPERS ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---- LOADING ---- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- DIVIDER ---- */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: var(--text-3);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-sub { color: var(--text-2); font-size: 15px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn 0.2s;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px; width: 100%;
  animation: slideUp 0.3s var(--transition);
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 800; }
.modal-close { background: var(--card); border: none; color: var(--text-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { color: var(--text); background: var(--card-hover); }

/* ---- TOAST ---- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  min-width: 240px;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-color: rgba(74,222,128,0.3); }
.toast.error { border-color: rgba(248,113,113,0.3); }

/* ---- PAGE LOADER ---- */
#page-loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.3s;
}
#page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: pulse 1.5s infinite;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 16px; }

  .chat-sidebar { display: none; }
  .chat-sidebar.open { display: flex; position: fixed; inset: 64px 0 0 0; z-index: 50; width: 100%; }

  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 20px 16px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .auth-card { padding: 28px 20px; }
  .profile-header { flex-direction: column; }
  .nav-links .hide-mobile { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
  .msg-row { max-width: 90%; }
  .chat-messages { padding: 16px; }
  .chat-input-area { padding: 12px 16px; }
}

@media (max-width: 480px) {
  .container, .container-sm, .container-md { padding: 0 16px; }
  .card-pad { padding: 16px; }
  .pricing-card { padding: 24px 20px; }
}

/* ---- UTILITY ---- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-2 { color: var(--text-2); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.rounded-full { border-radius: 9999px; }