/* ============================================================================
   USD Research Dashboard - Disney Theme
   Luxury/Refined aesthetic with magical touches
   ============================================================================ */

/* Font Imports - VoidAI-Inspired Typography */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables - Disney Color Palette */
:root {
  /* Primary Disney Colors */
  --disney-blue-primary: #0066CC;
  --disney-blue-dark: #003087;
  --disney-blue-light: #00A0E3;

  /* Accent Colors */
  --disney-gold: #00D4FF;  /* Changed to cyan for dark mode consistency */
  --disney-silver: #C0C0C0;

  /* UI Colors */
  --background-primary: #0A0E27;
  --background-secondary: #1A1F3A;
  --text-primary: #FFFFFF;
  --text-secondary: #B8C5D6;
  --text-muted: #8892A6;
  --border-color: rgba(0, 102, 204, 0.3);

  /* Status Colors */
  --status-active: #00E676;
  --status-pending: #FFD600;
  --status-error: #FF5252;
  --status-info: #00A0E3;

  /* Typography - VoidAI Style */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-code: 'JetBrains Mono', 'Consolas', monospace;

  /* Glassmorphism variables */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px);

  /* Glow effects with Disney colors - Enhanced Blue Halo */
  --glow-blue: 0 8px 32px rgba(0, 102, 204, 0.4), 0 0 24px rgba(0, 160, 227, 0.3);
  --glow-blue-hover: 0 15px 50px rgba(0, 102, 204, 0.6), 0 0 40px rgba(0, 160, 227, 0.5);
  --glow-light-blue: 0 8px 32px rgba(0, 160, 227, 0.4), 0 0 24px rgba(0, 102, 204, 0.3);

  /* Purple Gradient Accent (added 2026-05-10) */
  --purple-gradient-start: #667eea;
  --purple-gradient-end: #764ba2;
  --purple-gradient: linear-gradient(135deg, var(--purple-gradient-start), var(--purple-gradient-end));

  /* Transitions */
  --transition-smooth: all 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.1);
  --shadow-md: 0 8px 32px rgba(0, 102, 204, 0.1);
  --shadow-lg: 0 12px 48px rgba(0, 102, 204, 0.2);
  --shadow-xl: 0 20px 64px rgba(0, 102, 204, 0.3);

  /* Animation */
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;
  --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   Global Styles
   ============================================================================ */

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

/* Fix white flash between pages */
html {
  background-color: var(--background-primary);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-primary);
  background: linear-gradient(135deg,
    var(--background-primary) 0%,
    #0d1428 50%,
    #1a1f3a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Typography Styles - VoidAI Inspired */
h1, h2, h3, h4, h5, h6, .display-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: 64px; font-weight: 800; }
h2 { font-size: 48px; font-weight: 700; }
h3 { font-size: 32px; font-weight: 700; }
h4 { font-size: 24px; font-weight: 600; }

code, pre, .code-block {
  font-family: var(--font-code);
  font-size: 14px;
}

/* Magical star field background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent);
  background-size: 200px 200px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px, 110px 140px;
  animation: twinkle 3s ease-in-out infinite;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 3.5rem;
  background: linear-gradient(135deg,
    var(--disney-blue-light),
    var(--disney-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.5rem;
  color: var(--disney-blue-light);
}

h3 {
  font-size: 2rem;
  color: var(--text-primary);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--disney-blue-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing-standard);
}

a:hover {
  color: var(--disney-gold);
}

code {
  font-family: var(--font-code);
  background: rgba(0, 102, 204, 0.1);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* ============================================================================
   Layout Components
   ============================================================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-xl);
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  margin-bottom: var(--spacing-md);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  animation: fadeInUp 1s ease-out;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--easing-standard);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--disney-blue-primary),
    transparent);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--disney-blue-light);
}

.card:hover::before {
  opacity: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--easing-standard);
  border: none;
  text-align: center;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg,
    var(--disney-blue-primary),
    var(--disney-blue-dark));
  color: white;
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--duration-slow), height var(--duration-slow);
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

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

.btn-secondary {
  background: transparent;
  color: var(--disney-blue-light);
  border: 2px solid var(--disney-blue-primary);
  box-shadow: 0 0 16px rgba(0, 160, 227, 0.2);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--disney-blue-light) 0%, var(--disney-blue-primary) 100%);
  color: white;
  border-color: var(--disney-blue-light);
  box-shadow: var(--glow-light-blue);
}

.btn-small {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.9rem;
}

/* ============================================================================
   Status Indicators
   ============================================================================ */

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-connected {
  background: rgba(0, 230, 118, 0.1);
  color: var(--status-active);
  border: 1px solid var(--status-active);
}

.status-connected::before {
  animation: pulse 2s ease-in-out infinite;
}

.status-pending {
  background: rgba(255, 214, 0, 0.1);
  color: var(--status-pending);
  border: 1px solid var(--status-pending);
}

.status-error {
  background: rgba(255, 82, 82, 0.1);
  color: var(--status-error);
  border: 1px solid var(--status-error);
}

.status-offline {
  background: rgba(136, 146, 166, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

/* ============================================================================
   Navigation
   ============================================================================ */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  background: rgba(26, 31, 58, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--disney-blue-light);
}

.nav-brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px var(--disney-blue-primary));
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--duration-fast);
}

.nav-links a:hover {
  color: var(--disney-gold);
}

/* ============================================================================
   Icons
   ============================================================================ */

.disney-icon {
  display: inline-block;
  transition: transform var(--duration-normal) var(--easing-standard);
}

.disney-icon-small {
  width: 20px;
  height: 20px;
}

.disney-icon-medium {
  width: 32px;
  height: 32px;
}

.disney-icon-large {
  width: 48px;
  height: 48px;
}

.disney-icon-hero {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px var(--disney-blue-primary));
}

.disney-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mt-3 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }
.mb-3 { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }
.flex { display: flex; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gap-1 { gap: var(--spacing-md); }
.gap-2 { gap: var(--spacing-lg); }

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .container { padding: var(--spacing-md); }
  .hero { padding: var(--spacing-xl) var(--spacing-md); }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================================================
   Floating Particles Animation - VoidAI Inspired
   ============================================================================ */

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--disney-blue-light);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Generate multiple particles with staggered delays */
.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; }

/* ============================================================================
   Icon Sizing Classes
   ============================================================================ */

.icon-inline {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
}

.icon-btn {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
}

.icon-large {
  width: 32px;
  height: 32px;
}

.disney-icon-large {
  width: 28px;
  height: 28px;
  vertical-align: middle;
}
