/* ToonCraft Studio Theme - High Contrast Dark Professional Creative Suite */
:root {
  --bg-main: #0c0e14;
  --bg-sidebar: #080a0f;
  --bg-card: #151821;
  --bg-card-hover: #1c212d;
  --bg-input: #10131a;
  --border-subtle: #242938;
  --border-focus: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-amber: #f59e0b;
  --accent-amber-hover: #d97706;
  --accent-rose: #f43f5e;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* ---------------- Left Nav Rail ---------------- */
.nav-rail {
  width: 72px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 16px;
  z-index: 50;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.nav-item {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 9px;
  font-weight: 600;
  gap: 3px;
  text-decoration: none;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background-color: var(--bg-card);
}

.nav-item.active {
  border-left: 3px solid var(--accent-amber);
  color: var(--accent-amber);
}

.nav-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: #27272a;
  border: 2px solid var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

/* ---------------- Main Content Workspace ---------------- */
.main-wrapper {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* View 1: Creator Landing Screen */
#view-create {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.create-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.creator-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.creator-hero h1 {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-toggle {
  display: inline-flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background-color: #fff;
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Prompt Box Card */
.prompt-box-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  position: relative;
}

.prompt-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 18px;
  font-family: inherit;
  resize: none;
  min-height: 80px;
  line-height: 1.5;
}

.prompt-textarea::placeholder {
  color: #475569;
}

.prompt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 12px;
}

.prompt-pills-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-select-wrapper {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.pill-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.btn-generate {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: #27272a;
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-generate:hover {
  background-color: var(--accent-amber);
  color: #000;
  transform: scale(1.05);
}

/* Skills Section */
.skills-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-label-group h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-label-group p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.skill-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.skill-card:hover {
  border-color: var(--accent-amber);
  transform: translateY(-2px);
}

.skill-card.active {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}

.skill-thumbnail {
  height: 120px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.skill-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(12, 14, 20, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-amber);
}

.skill-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.skill-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------------- View 2: Studio Project Workspace ---------------- */
#view-studio {
  display: none;
  flex: 1;
  height: 100vh;
  flex-direction: column;
}

.studio-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.studio-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-back:hover {
  color: #fff;
}

.project-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-instance {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-instance::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

.btn-make-film {
  background-color: var(--accent-amber);
  color: #000;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-make-film:hover {
  background-color: var(--accent-amber-hover);
  transform: translateY(-1px);
}

/* Studio 3-Column Body */
.studio-body {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* Left Studio Panel */
.studio-sidebar {
  background-color: #0e1017;
  border-right: 1px solid var(--border-subtle);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-block h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.element-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}

.element-label {
  color: var(--text-secondary);
}

.element-value-pill {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Cast & Subjects Shelf */
.cast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cast-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: border-color 0.15s ease;
}

.cast-card:hover {
  border-color: var(--accent-amber);
}

.cast-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: #27272a;
}

.cast-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-badge {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-amber);
  text-transform: uppercase;
}

/* Center Screenplay Panel */
.screenplay-panel {
  padding: 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brief-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.brief-box h5 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.brief-box p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.scene-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.scene-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: var(--bg-card-hover);
}

.scene-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scene-num-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.scene-camera-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background-color: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.scene-action-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.mention-pill {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
}

.dialogue-quote {
  border-left: 3px solid var(--accent-amber);
  padding-left: 12px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-primary);
}

.dialogue-speaker {
  font-weight: 700;
  font-style: normal;
  color: #fff;
  margin-right: 6px;
}

/* Right Studio Player Panel */
.player-panel {
  background-color: #0e1017;
  border-left: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.video-container {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  background-color: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.play-overlay-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: rgba(245, 158, 11, 0.9);
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-overlay-btn:hover {
  transform: scale(1.1);
}

.render-progress-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), #ef4444);
  transition: width 0.3s ease;
}

/* ---------------- Scene Edit Modal ---------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background-color: #12151e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  overflow-y: auto;
}

.modal-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beat-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.beat-timing {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-amber);
}

.beat-direction {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.take-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.take-pill {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.take-pill.active {
  background-color: var(--accent-amber);
  color: #000;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0d0f16;
}

.btn-regenerate {
  background-color: var(--accent-amber);
  color: #000;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Append Timeline Editor Styles to styles.css */
.timeline-workspace {
  display: none;
  flex: 1;
  flex-direction: column;
  background-color: #0b0d13;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.timeline-toolbar {
  height: 48px;
  background-color: #11141c;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.timeline-transport {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-transport {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-transport:hover {
  background-color: var(--accent-amber);
  color: #000;
}

.timecode-display {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-amber);
  background-color: var(--bg-input);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.timeline-canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  padding: 16px 20px;
}

/* Time Ruler */
.timeline-ruler {
  height: 28px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  position: relative;
  min-width: 900px;
}

.ruler-tick {
  width: 120px;
  border-left: 1px solid #334155;
  height: 12px;
  font-size: 10px;
  font-family: monospace;
  color: var(--text-muted);
  padding-left: 4px;
}

/* Multi-track Stack */
.tracks-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 900px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.track-header {
  width: 110px;
  background-color: #161922;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px;
  gap: 4px;
  flex-shrink: 0;
}

.track-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-lane {
  flex: 1;
  background-color: #10131b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 8px;
  position: relative;
}

/* Track Clip Blocks */
.clip-block {
  height: 52px;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: grab;
  user-select: none;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clip-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.clip-block-video {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-left: 4px solid var(--accent-amber);
}

.clip-block-audio {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-left: 4px solid var(--accent-blue);
}

.clip-block-music {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-left: 4px solid var(--accent-emerald);
}

.clip-thumb-small {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: #000;
}

.clip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clip-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.clip-duration {
  font-size: 9px;
  color: var(--text-muted);
}

/* Audio Waveform visualization */
.waveform-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.waveform-bar {
  width: 3px;
  background-color: var(--accent-blue);
  border-radius: 2px;
}

/* Responsive Breakpoints for Tablet & Mobile (390px+) */
@media (max-width: 960px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .nav-rail {
    width: 100%;
    height: 56px;
    flex-direction: row;
    padding: 0 16px;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-rail .nav-bottom {
    margin-top: 0;
  }
  .studio-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: visible;
  }
  .studio-sidebar, .player-panel {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------
   Member-Only OpenID Login Gate & User Profile Widget
   High-Contrast Dark Slate Theme (Zero Purple Gradients)
------------------------------------------------------------- */
.member-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(7, 10, 16, 0.95);
  backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.member-gate-card {
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.gate-logo {
  text-align: center;
  margin: 16px 0 20px;
}

.gate-icon-poly {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-logo h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.gate-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.gate-notice-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.gate-notice-title {
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gate-whitelist-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.whitelist-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #090d16;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
}

.whitelist-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.gate-auth-action {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  min-height: 44px;
}

.gate-quick-login {
  margin-top: 16px;
}

.gate-divider {
  text-align: center;
  position: relative;
  margin: 16px 0 14px;
}

.gate-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #334155;
}

.gate-divider span {
  position: relative;
  background: #0f172a;
  padding: 0 10px;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.quick-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-quick-auth {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-auth:hover {
  background: #334155;
  border-color: #38bdf8;
  color: #ffffff;
}

.auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.gate-error-alert {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  border-radius: 8px;
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.4;
}

.gate-security-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  color: #64748b;
  font-size: 11px;
}

.user-profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.btn-logout {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}
