/* ============================================
   PREMIUM DARK-MODERN UI
   Inspired by smooth, polished dashboard aesthetics
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Core palette */
  --bg-base: #0f0f1a;
  --bg-elevated: #161625;
  --bg-surface: #1e1e32;
  --bg-surface-hover: #262640;
  --bg-glass: rgba(30, 30, 50, 0.7);
  
  /* Accent colors */
  --accent-primary: #7c5cff;
  --accent-primary-glow: rgba(124, 92, 255, 0.4);
  --accent-secondary: #00d4aa;
  --accent-secondary-glow: rgba(0, 212, 170, 0.3);
  --famu-green: #006747;
  --famu-orange: #f77f00;
  
  /* Text colors */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b5;
  --text-muted: #6b6b80;
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(124, 92, 255, 0.3);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-primary-glow);
  
  /* Gradients */
  --gradient-surface: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, rgba(0, 212, 170, 0.08) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, #9d7aff 100%);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Atmospheric Background ---------- */
.atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.atmosphere-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.atmosphere-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.atmosphere-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-secondary-glow) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.atmosphere-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(247, 127, 0, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.brand-link:hover {
  opacity: 0.9;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.brand-famu {
  font-size: 20px;
  font-weight: 700;
  color: var(--famu-orange);
  letter-spacing: -0.5px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link i {
  font-size: 14px;
}

@media (max-width: 600px) {
  .brand-copy {
    display: none;
  }
  
  .nav-link span {
    display: none;
  }
  
  .nav-link {
    padding: var(--space-sm);
  }
  
  .nav-link i {
    font-size: 18px;
  }
}

/* ---------- App Shell ---------- */
.app-shell {
  min-height: calc(100vh - 72px - 80px);
  padding: var(--space-xl) 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-brand i {
  color: var(--accent-primary);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Chat Workspace ---------- */
.chat-workspace {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* ---------- Hero Section ---------- */
.chat-hero {
  position: relative;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
}

.hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.hero-title {
  margin: 0 0 var(--space-sm);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .chat-hero {
    padding: var(--space-xl) var(--space-md);
  }
  
  .hero-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .hero-title {
    font-size: 22px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
}

/* ---------- Chat Layout ---------- */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 968px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Sidebar ---------- */
.chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sidebar-panel {
  background: var(--gradient-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel-header i {
  color: var(--accent-primary);
}

.panel-body {
  padding: var(--space-md);
}

.scope-description {
  margin-bottom: var(--space-md);
}

.scope-description p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.doc-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.doc-option:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.doc-option input {
  display: none;
}

.doc-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-medium);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.doc-option input:checked + .doc-radio {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.doc-option input:checked + .doc-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.doc-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.doc-label i {
  color: var(--accent-secondary);
  margin-right: var(--space-xs);
}

.doc-option-all .doc-label {
  flex-direction: row;
  align-items: center;
}

.doc-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-date {
  font-size: 11px;
  color: var(--text-muted);
}

.empty-docs {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
}

.empty-docs i {
  font-size: 32px;
  margin-bottom: var(--space-sm);
  opacity: 0.5;
}

.empty-docs p {
  margin: 0;
  font-size: 13px;
}

/* Tips Panel */
.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.tips-list i {
  color: var(--accent-secondary);
  font-size: 10px;
  margin-top: 5px;
}

@media (max-width: 968px) {
  .chat-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-panel {
    flex: 1;
    min-width: 250px;
  }
  
  .sidebar-tips {
    display: none;
  }
}

/* ---------- Chat Main Area ---------- */
.chat-main {
  min-width: 0;
}

.chat-container {
  background: var(--gradient-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* ---------- Messages Area ---------- */
.messages-wrapper {
  flex: 1;
  overflow: hidden;
}

.messages-container {
  height: 400px;
  overflow-y: auto;
  padding: var(--space-lg);
  scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--border-accent);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: var(--space-xl);
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.empty-icon i {
  font-size: 32px;
  color: var(--accent-primary);
  opacity: 0.7;
}

.empty-state h3 {
  margin: 0 0 var(--space-sm);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state p {
  margin: 0 0 var(--space-lg);
  font-size: 14px;
  color: var(--text-muted);
}

.suggested-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.prompt-chip:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.prompt-chip i {
  font-size: 12px;
  color: var(--accent-primary);
}

/* Message Pairs */
.message-pair {
  margin-bottom: var(--space-lg);
}

.message-pair:last-child {
  margin-bottom: 0;
}

/* Bubbles */
.bubble {
  max-width: 85%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
  word-wrap: break-word;
}

.bubble.user {
  margin-left: auto;
  background: var(--gradient-accent);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.bubble.bot {
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm);
}

.bubble.thinking {
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  border-bottom-left-radius: var(--radius-sm);
}

.source-info {
  display: block;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Thinking Indicator */
.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-xs) 0;
}

.thinking-indicator .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: thinking-pulse 1.4s ease-in-out infinite;
}

.thinking-indicator .dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-indicator .dot:nth-child(2) { animation-delay: -0.16s; }
.thinking-indicator .dot:nth-child(3) { animation-delay: 0s; }

@keyframes thinking-pulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .messages-container {
    height: 350px;
    padding: var(--space-md);
  }
  
  .bubble {
    max-width: 90%;
    padding: var(--space-sm) var(--space-md);
  }
}

/* ---------- Composer Area ---------- */
.composer-wrapper {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.composer-inner {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.composer-inner:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.composer-input-wrap {
  flex: 1;
  min-width: 0;
}

.composer-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  min-height: 44px;
  max-height: 150px;
}

.composer-textarea::placeholder {
  color: var(--text-muted);
}

.composer-textarea:focus {
  outline: none;
}

.composer-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--gradient-accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.composer-send:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.composer-send:active {
  transform: translateY(0);
}

.composer-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.composer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 12px;
  color: var(--text-muted);
}

.composer-hint kbd {
  padding: 2px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 11px;
}

.hint-divider {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .composer-wrapper {
    padding: var(--space-md);
  }
  
  .composer-hint {
    display: none;
  }
}

/* ---------- Utility Classes ---------- */
.hidden {
  display: none !important;
}

/* ---------- Cards (Legacy Support) ---------- */
.card {
  background: var(--gradient-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.card h2 {
  margin: 0 0 var(--space-md);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
}

/* ---------- Buttons (Legacy Support) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

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

.btn.outline {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn.outline:hover {
  background: var(--accent-primary);
  color: white;
}

/* ---------- Form Elements (Legacy Support) ---------- */
.input,
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: all var(--transition-fast);
}

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* ---------- Details/Summary (Legacy Support) ---------- */
details {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

summary {
  padding: var(--space-md);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

summary:hover {
  color: var(--text-primary);
}

details[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

details .doc-list {
  padding: var(--space-md);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .chat-hero {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  .hero-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .hero-title {
    font-size: 18px;
  }
  
  .chat-container {
    border-radius: var(--radius-lg);
    min-height: 400px;
  }
  
  .empty-icon {
    width: 64px;
    height: 64px;
  }
  
  .empty-icon i {
    font-size: 24px;
  }
}

/* ---------- Welcome Page ---------- */
.welcome-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

/* Welcome Hero */
.welcome-hero {
  position: relative;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-align: center;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
}

.welcome-hero-glow-2 {
  background: radial-gradient(circle, var(--accent-secondary-glow) 0%, transparent 70%);
  top: auto;
  bottom: -200px;
  left: 30%;
}

.welcome-hero-content {
  position: relative;
  z-index: 1;
}

.welcome-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.welcome-brand-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-accent);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.welcome-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}

.welcome-famu {
  font-size: 18px;
  font-weight: 700;
  color: var(--famu-orange);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.welcome-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.welcome-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.welcome-btn-primary {
  background: var(--gradient-accent);
  color: white;
  border: none;
  box-shadow: var(--shadow-sm);
}

.welcome-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.welcome-btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.welcome-btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
}

.welcome-btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 16px;
}

/* Stats Section */
.welcome-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: var(--gradient-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.stat-card-highlight {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, var(--bg-surface) 100%);
  border-color: var(--border-accent);
}

.stat-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-surface-hover);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.stat-card-highlight .stat-icon {
  background: var(--gradient-accent);
  color: white;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Features Section */
.welcome-features {
  padding: var(--space-xl) 0;
}

.features-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.features-title {
  margin: 0 0 var(--space-sm);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.features-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  position: relative;
  padding: var(--space-xl);
  background: var(--gradient-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  overflow: hidden;
}

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.feature-card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.feature-card:hover .feature-card-glow {
  opacity: 1;
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.feature-icon-secondary {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, #00b894 100%);
}

.feature-icon-tertiary {
  background: linear-gradient(135deg, var(--famu-orange) 0%, #e17055 100%);
}

.feature-title {
  margin: 0 0 var(--space-sm);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-description {
  margin: 0 0 var(--space-md);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bottom CTA */
.welcome-bottom-cta {
  padding: var(--space-2xl);
  background: var(--gradient-hero);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  text-align: center;
}

.bottom-cta-content h3 {
  margin: 0 0 var(--space-sm);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.bottom-cta-content p {
  margin: 0 0 var(--space-lg);
  font-size: 16px;
  color: var(--text-secondary);
}

/* Welcome Page Responsive */
@media (max-width: 968px) {
  .welcome-stats {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .welcome-hero {
    padding: var(--space-xl) var(--space-md);
    min-height: 350px;
  }
  
  .welcome-brand {
    flex-direction: column;
    text-align: center;
  }
  
  .welcome-brand-text {
    align-items: center;
  }
  
  .welcome-brand-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
  
  .welcome-title {
    font-size: 28px;
  }
  
  .welcome-subtitle {
    font-size: 16px;
  }
  
  .welcome-cta {
    flex-direction: column;
  }
  
  .welcome-btn {
    width: 100%;
    justify-content: center;
  }
  
  .stat-card {
    padding: var(--space-lg);
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .features-title {
    font-size: 22px;
  }
  
  .feature-card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .welcome-page {
    gap: var(--space-xl);
  }
  
  .welcome-hero {
    border-radius: var(--radius-lg);
  }
  
  .welcome-brand-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .welcome-title {
    font-size: 24px;
  }
  
  .bottom-cta-content h3 {
    font-size: 20px;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .atmosphere,
  .site-header,
  .site-footer,
  .chat-sidebar,
  .composer-wrapper {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .messages-container {
    height: auto;
    max-height: none;
  }
}
