:root {
  /* === DARK MODE (Premium Midnight) === */
  --color-bg: #0f172a;
  /* Slate 900 */
  --color-surface: #1e293b;
  /* Slate 800 */
  --color-card: #334155;
  /* Slate 700 */

  --color-accent-primary: #38bdf8;
  /* Sky 400 - Tech Blue */
  --color-accent-secondary: #2dd4bf;
  /* Teal 400 - Fresh Green */

  --color-text: #f1f5f9;
  /* Slate 100 */
  --color-text-muted: #94a3b8;
  /* Slate 400 */
  --color-border: #475569;
  /* Slate 600 */

  --glow-primary: rgba(56, 189, 248, 0.3);
  --glow-secondary: rgba(45, 212, 191, 0.2);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

/* === LIGHT MODE (Professional Corp) === */
[data-theme="light"] {
  --color-bg: #f8fafc;
  /* Slate 50 */
  --color-surface: #ffffff;
  --color-card: #ffffff;

  --color-accent-primary: #0f172a;
  /* Slate 900 - Strong Dark */
  --color-accent-secondary: #0369a1;
  /* Sky 700 */

  --color-text: #334155;
  /* Slate 700 */
  --color-text-muted: #64748b;
  /* Slate 500 */
  --color-border: #cbd5e1;
  /* Slate 300 */

  --glow-primary: rgba(15, 23, 42, 0.1);
  --glow-secondary: rgba(3, 105, 161, 0.1);
}

/* Base */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  transition: background 0.3s, color 0.3s;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

/* Card Component */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px var(--glow-primary);
  border-color: var(--color-accent-primary);
}

/* Gradient Buttons (Premium style) */
.btn-glow {
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
  box-shadow: 0 4px 15px var(--glow-primary);
  color: #fff;
  /* Always white text on colored buttons */
  transition: all 0.3s ease;
}

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

/* Entrance Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Modal Chat */
.chat-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.8);
  /* Slate 900 with opacity */
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 50;
}

.chat-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-container {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--color-surface);
  border: 1px solid var(--color-accent-primary);
  border-radius: 1rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-modal.open .chat-container {
  transform: scale(1);
}