/* =============================================================================
   CodeBridge — Theme: Future Clean (Default)
   The default theme. Variables already match the :root defaults in main.css.
   This file reinforces them under body[data-theme="future"] and adds
   theme-specific visual enhancements.
   ============================================================================= */

/* =============================================================================
   Variable Overrides — Future Clean
   Explicitly scoped so switching themes is clean and predictable.
   ============================================================================= */
body[data-theme="future"] {
  /* Backgrounds */
  --bg-primary:   #050d1a;
  --bg-secondary: #0a1628;
  --bg-card:      #0d1f38;

  /* Borders */
  --border-color: rgba(0, 212, 255, 0.15);

  /* Brand colours */
  --color-primary:   #00d4ff;
  --color-secondary: #00ff9d;
  --color-accent:    #ff6b35;

  /* Text */
  --text-primary:   #e8edf5;
  --text-secondary: #8899aa;
  --text-muted:     #556677;

  /* Typography */
  --font-heading: 'Orbitron', monospace;
  --font-body:    'Exo 2', sans-serif;

  /* Misc */
  --radius:     8px;
  --shadow:     0 4px 24px rgba(0, 0, 0, 0.3);
  --transition: 200ms ease;

  /* Layout */
  --sidebar-width: 240px;

  /* Effects */
  --glow-primary:   0 0 20px rgba(0, 212, 255, 0.3);
  --glow-secondary: 0 0 16px rgba(0, 255, 157, 0.25);
  --glow-accent:    0 0 16px rgba(255, 107, 53, 0.25);
}

/* =============================================================================
   Base Enhancements
   ============================================================================= */

/* Subtle noise texture on body for depth */
body[data-theme="future"] {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 255, 157, 0.02) 0%, transparent 50%);
}

/* =============================================================================
   Sidebar — Future Clean extras
   ============================================================================= */

/* Faint cyan gradient tint at the top of sidebar */
body[data-theme="future"] .sidebar {
  background: linear-gradient(
    180deg,
    rgba(0, 212, 255, 0.04) 0%,
    var(--bg-secondary) 120px
  );
}

/* Logo glow */
body[data-theme="future"] .sidebar-logo h1 {
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Active nav item has subtle left-edge glow */
body[data-theme="future"] .nav-item.active {
  box-shadow: inset 3px 0 8px rgba(0, 212, 255, 0.1);
}

/* =============================================================================
   Buttons — Future Clean
   ============================================================================= */

/* Primary button: strong glow, depth on hover */
body[data-theme="future"] .btn-primary {
  background: var(--color-primary);
  color: #000;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  box-shadow: var(--glow-primary);
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
body[data-theme="future"] .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 400ms ease;
}

body[data-theme="future"] .btn-primary:hover::after {
  left: 150%;
}

body[data-theme="future"] .btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 4px 16px rgba(0, 212, 255, 0.2);
  opacity: 0.95;
  transform: translateY(-1px);
}

/* =============================================================================
   Cards — Future Clean
   ============================================================================= */

/* Animated gradient border on card hover */
body[data-theme="future"] .card {
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

body[data-theme="future"] .card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.08),
    inset 0 1px 0 rgba(0, 212, 255, 0.06);
}

/* Top-edge highlight on cards */
body[data-theme="future"] .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.3),
    transparent
  );
  border-radius: 0 0 4px 4px;
  pointer-events: none;
}

/* =============================================================================
   Project Cards
   ============================================================================= */
body[data-theme="future"] .project-card:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 212, 255, 0.2),
    var(--glow-primary);
}

/* =============================================================================
   Stat Cards
   ============================================================================= */
body[data-theme="future"] .stat-number {
  text-shadow: 0 0 16px rgba(0, 212, 255, 0.4);
}

/* =============================================================================
   Form Controls
   ============================================================================= */
body[data-theme="future"] .form-control:focus {
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.1),
    0 0 12px rgba(0, 212, 255, 0.08);
}

/* =============================================================================
   Chat — Future Clean
   ============================================================================= */
body[data-theme="future"] .message-user .message-bubble {
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.2);
}

body[data-theme="future"] .chat-textarea:focus {
  box-shadow:
    0 0 0 2px rgba(0, 212, 255, 0.15),
    0 0 20px rgba(0, 212, 255, 0.05);
}

/* =============================================================================
   AI Model Badge / Status Indicator
   ============================================================================= */

/* Generic model/status badge with pulsing dot */
body[data-theme="future"] .model-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

body[data-theme="future"] .model-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  animation: pulse-dot-future 2s ease-in-out infinite;
}

@keyframes pulse-dot-future {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5);
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 5px rgba(0, 212, 255, 0);
    transform: scale(1.1);
  }
}

/* =============================================================================
   Scrollbars — themed cyan
   ============================================================================= */
body[data-theme="future"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body[data-theme="future"] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

body[data-theme="future"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.25);
  border-radius: 3px;
}

body[data-theme="future"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.45);
}

/* =============================================================================
   Selection
   ============================================================================= */
body[data-theme="future"] ::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}

/* =============================================================================
   Focus ring
   ============================================================================= */
body[data-theme="future"] :focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* =============================================================================
   Badges — extra glow for Future
   ============================================================================= */
body[data-theme="future"] .badge-primary {
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.15);
}

body[data-theme="future"] .badge-success {
  box-shadow: 0 0 8px rgba(0, 255, 157, 0.15);
}

/* =============================================================================
   Tab active underline glow
   ============================================================================= */
body[data-theme="future"] .tab.active {
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* =============================================================================
   Loading spinner — cyan glow
   ============================================================================= */
body[data-theme="future"] .spinner {
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

/* =============================================================================
   Gradient headings (optional hero/landing use)
   ============================================================================= */
body[data-theme="future"] .gradient-heading {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================================================
   Footer user avatar — cyan ring
   ============================================================================= */
body[data-theme="future"] .user-avatar {
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}
