:root {
  --bg-main: #0b0f19;
  --bg-sidebar: #070a12;
  --bg-card: rgba(22, 27, 44, 0.7);
  --bg-card-hover: rgba(30, 37, 60, 0.85);
  --bg-surface: #131929;
  --bg-input: #0e1322;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 45, 135, 0.4);
  --accent: #ff2d87;
  --accent-hover: #ff4d9c;
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #ff1cac 0%, #fd5fc2 50%, #8b5cf6 100%);
  --accent-glow: rgba(255, 45, 135, 0.25);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 72px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: width 0.3s ease, transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}

.brand-text span {
  color: var(--accent);
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

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

.nav-item.active {
  background: rgba(255, 45, 135, 0.12);
  color: var(--accent);
  border-color: rgba(255, 45, 135, 0.25);
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sparks-pill {
  background: linear-gradient(135deg, rgba(255, 45, 135, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(255, 45, 135, 0.3);
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.sparks-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.sparks-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}

.sparks-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.search-box {
  position: relative;
  max-width: 440px;
  width: 100%;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 9px 18px 9px 42px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: var(--accent-gradient);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255, 45, 135, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 45, 135, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Carousel */
.hero-banner {
  margin: 20px 24px 12px;
  padding: 32px 36px;
  background: linear-gradient(135deg, rgba(30, 20, 50, 0.85) 0%, rgba(15, 10, 30, 0.95) 100%);
  border: 1px solid rgba(255, 45, 135, 0.25);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 45, 135, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  z-index: 2;
}

.hero-badge {
  background: rgba(255, 45, 135, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 45, 135, 0.35);
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 40%, #ff79d1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

/* Category Pills */
.categories-bar {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.category-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.category-pill.active {
  background: rgba(255, 45, 135, 0.15);
  color: var(--accent);
  border-color: rgba(255, 45, 135, 0.35);
}

/* Character Grid */
.character-grid {
  padding: 16px 24px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.character-card {
  position: relative;
  aspect-ratio: 240 / 380;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
}

.character-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.card-img-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.card-img-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.character-card:hover .card-img-secondary {
  opacity: 1;
}

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 50%, rgba(10,14,24,0.96) 90%);
  pointer-events: none;
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.badge-tag {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-hud {
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-creator {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-top: 4px;
}

.card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Chat Page View */
.chat-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(13, 17, 30, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.chat-user-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-user-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Live HUD Bar */
.hud-bar {
  background: linear-gradient(90deg, rgba(255, 45, 135, 0.12) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-bottom: 1px solid rgba(255, 45, 135, 0.25);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  font-size: 0.82rem;
  font-weight: 600;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hud-value {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Message Thread */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message-row {
  display: flex;
  gap: 12px;
  max-width: 820px;
  width: 100%;
}

.message-row.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.msg-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.94rem;
  line-height: 1.6;
  position: relative;
}

.message-row.character .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}

.message-row.user .msg-bubble {
  background: linear-gradient(135deg, #ff2d87 0%, #d91b6f 100%);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(255, 45, 135, 0.3);
}

.msg-bubble em, .msg-bubble i {
  color: #f472b6;
  font-style: italic;
}

.msg-photo-attachment {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  max-width: 340px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.msg-photo-attachment img {
  width: 100%;
  display: block;
  cursor: pointer;
  transition: transform 0.3s;
}

.msg-photo-attachment img:hover {
  transform: scale(1.02);
}

.msg-tools {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.msg-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.msg-tool-btn.playing {
  color: var(--accent);
}

/* Chat Input Bar */
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.95);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.action-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-chip:hover {
  background: rgba(255, 45, 135, 0.15);
  border-color: rgba(255, 45, 135, 0.3);
  color: var(--accent);
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 6px 10px 6px 16px;
  transition: all 0.2s;
}

.chat-input-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.chat-input-form textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  resize: none;
  height: 40px;
  line-height: 20px;
  font-family: inherit;
}

.chat-input-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-input-btn:hover {
  color: var(--accent);
  background: rgba(255, 45, 135, 0.1);
}

.chat-input-btn.btn-send {
  background: var(--accent-gradient);
  color: #fff;
}

.chat-input-btn.btn-send:hover {
  box-shadow: 0 0 12px var(--accent);
}

/* Chat Right Sidebar (Dossier) */
.chat-dossier {
  width: 320px;
  border-left: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width 0.3s ease;
}

.dossier-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.dossier-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dossier-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Generators Studio View */
.studio-container {
  padding: 24px 32px 64px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.studio-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 28px;
}

.studio-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.studio-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(255, 45, 135, 0.35);
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

.control-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover, .preset-chip.active {
  border-color: var(--accent);
  background: rgba(255, 45, 135, 0.12);
  color: var(--accent);
}

.preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  position: relative;
  overflow: hidden;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.preview-img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #141a2c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  max-width: 520px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Content Gate 18+ */
#content-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 7, 12, 0.96);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cg-card {
  background: #121828;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.cg-logo {
  height: 28px;
  margin-bottom: 16px;
}

.cg-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #fff;
}

.cg-subtitle {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-bottom: 20px;
}

.cg-genders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.cg-gender-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.cg-gender-btn:hover, .cg-gender-btn.active {
  border-color: var(--accent);
  background: rgba(255, 45, 135, 0.15);
  color: var(--accent);
}

.cg-gender-btn img {
  width: 32px;
  height: 32px;
}

/* Waveform Audio Animation */
.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eq-bounce 1s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 70%; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { height: 50%; animation-delay: 0.4s; }

@keyframes eq-bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .chat-dossier {
    display: none;
  }
}
