/* ==========================================================================
   ALPHA GAME · LUXURY TACTICAL DESIGN SYSTEM (StyleSeed & Anti-AI-Slop Standard)
   Fonts: Playfair Display (Serif), Plus Jakarta Sans, JetBrains Mono
   Palette: Obsidian Dark (#07080a) & Champagne Gold (#d4af37)
   Rules: Strictly NO Emojis. 1 Primary Accent. Tabular Nums. Linear Precision.
   ========================================================================== */

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

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Surfaces - Obsidian Scale */
  --bg-canvas: #07080a;
  --bg-sidebar: #0d0f14;
  --bg-surface: rgba(16, 18, 24, 0.72);
  --bg-surface-elevated: #161820;
  --bg-surface-hover: rgba(28, 31, 40, 0.85);

  /* Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(212, 175, 55, 0.35);

  /* Brand Accents - Champagne Gold & Titanium */
  --gold-primary: #d4af37;
  --gold-light: #f4e09f;
  --gold-glow: #f9e8a2;
  --gold-dark: #aa8012;
  --gold-gradient: linear-gradient(135deg, #f9e8a2 0%, #d4af37 50%, #aa8012 100%);
  --gold-text-gradient: linear-gradient(135deg, #ffffff 0%, #f4e09f 45%, #d4af37 100%);

  /* Neutrals */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-subtle: #475569;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(ellipse 65% 35% at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
    radial-gradient(ellipse 50% 30% at 90% 85%, rgba(212, 175, 55, 0.03), transparent 60%);
  background-attachment: fixed;
}

/* Ambient Matrix Grid */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Typography Classes */
.font-serif {
  font-family: var(--font-serif) !important;
}

.font-mono {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

.gold-gradient-text {
  background: var(--gold-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: #232731;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #343a49;
}

/* Bento Glass Panels (Linear Standard) */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-medium);
}

.glass-panel-elevated {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Clean Precision Brackets */
.precision-border {
  position: relative;
}
.precision-border::before, .precision-border::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 2;
}
.precision-border::before {
  top: 0;
  left: 0;
  border-top: 1.5px solid var(--gold-primary);
  border-left: 1.5px solid var(--gold-primary);
  border-top-left-radius: 4px;
}
.precision-border::after {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid var(--gold-primary);
  border-right: 1.5px solid var(--gold-primary);
  border-bottom-right-radius: 4px;
}

/* Gold Accent Buttons */
.btn-gold {
  background: var(--gold-gradient);
  color: #0b0c10;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.38);
}

.btn-ghost-gold {
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-ghost-gold:hover {
  background: rgba(212, 175, 55, 0.16);
  color: #fff;
  border-color: var(--gold-primary);
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Live Status Pulse Dot */
.tactical-live-dot {
  animation: tacticalPulse 2.2s infinite;
}

@keyframes tacticalPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 6px var(--gold-primary)); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Sidebar States */
#sidebar.collapsed {
  width: 72px;
}
#sidebar.collapsed .sidebar-label {
  display: none !important;
}
#sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}
#sidebar.collapsed .brand-link {
  justify-content: center;
}

/* Modals System */
.modal-overlay {
  display: none;
  opacity: 0;
  pointer-events: none;
  background: rgba(3, 4, 6, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.modal-box {
  transform: translateY(0) scale(1);
  background: #0b0d13 !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.98), 0 0 50px rgba(212, 175, 55, 0.08) !important;
}

/* Luxury Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: #0f1218;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-item.success {
  border-color: rgba(16, 185, 129, 0.5);
}

/* Rank Monogram Badges */
.rank-badge-gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.06) 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--gold-light);
}

.rank-badge-silver {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.15) 0%, rgba(226, 232, 240, 0.04) 100%);
  border: 1px solid rgba(226, 232, 240, 0.35);
  color: #f1f5f9;
}

.rank-badge-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.05) 100%);
  border: 1px solid rgba(205, 127, 50, 0.4);
  color: #fcd34d;
}

.rank-badge-default {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Digital Asset Vault Custom Styling */
.asset-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.asset-tag-video {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.asset-tag-audio {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.asset-tag-pdf {
  background: rgba(234, 179, 8, 0.12);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.asset-tag-cases {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.asset-tag-prompt {
  background: rgba(212, 175, 55, 0.15);
  color: #f4e09f;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.modal-sub-tab {
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
}
.modal-sub-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}
.modal-sub-tab.active {
  color: #f4e09f;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

.pan-card {
  background: rgba(10, 12, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}
.pan-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(16, 20, 28, 0.9);
}

/* Audio Trial Waveform Animation */
.wave-bar {
  display: inline-block;
  width: 3px;
  background: #d4af37;
  border-radius: 2px;
  transition: height 0.15s ease;
}
.wave-playing .wave-bar:nth-child(1) { animation: wavePulse 0.8s ease-in-out infinite alternate; }
.wave-playing .wave-bar:nth-child(2) { animation: wavePulse 1.1s ease-in-out infinite alternate 0.1s; }
.wave-playing .wave-bar:nth-child(3) { animation: wavePulse 0.7s ease-in-out infinite alternate 0.2s; }
.wave-playing .wave-bar:nth-child(4) { animation: wavePulse 0.9s ease-in-out infinite alternate 0.15s; }
.wave-playing .wave-bar:nth-child(5) { animation: wavePulse 1.2s ease-in-out infinite alternate 0.05s; }
.wave-playing .wave-bar:nth-child(6) { animation: wavePulse 0.85s ease-in-out infinite alternate 0.25s; }
.wave-playing .wave-bar:nth-child(7) { animation: wavePulse 1.0s ease-in-out infinite alternate 0.3s; }

@keyframes wavePulse {
  0% { height: 4px; opacity: 0.5; }
  50% { height: 20px; opacity: 1; }
  100% { height: 8px; opacity: 0.7; }
}


/* ==========================================================================
   SKOOL + VIBECAFE UNIFIED ARCHITECTURE COMPONENT STYLES
   ========================================================================== */

/* Top Channel Tabs (Skool Style) */
.channel-tab-btn {
  position: relative;
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.channel-tab-btn.active {
  color: #f4e09f !important;
  background: rgba(212, 175, 55, 0.1) !important;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.channel-indicator {
  display: none;
}

.channel-tab-btn.active .channel-indicator {
  display: block;
  position: absolute;
  bottom: -10px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #d4af37;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

/* Feed Cards & Inline Autopsy Accordion */
.feed-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.feed-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.autopsy-accordion {
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* WeChat / iOS Style Speech Bubbles */
.chat-bubble-player {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #f4e09f;
  border-bottom-right-radius: 4px;
}

.chat-bubble-girl {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* Scrollbar Hide Utility */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
