/* Premium Dark Glassmorphism Design System */
:root {
  --font-primary: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Color Palette - Dark Mode Default */
  --bg-base: #090d16;
  --bg-surface: rgba(16, 22, 36, 0.75);
  --bg-card: rgba(22, 30, 49, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 212, 255, 0.3);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7f00ff;
  --accent-gold: #ffb703;
  --accent-glow: rgba(0, 242, 254, 0.25);
  
  --text-main: #f0f4f8;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --shadow-main: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(0, 0, 0, 0.03);
  
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(0, 150, 255, 0.4);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 25px rgba(79, 172, 254, 0.3);
}

/* Global Resets & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  position: relative;
}

/* Canvas Background */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Typography Utilities */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-text {
  background: linear-gradient(135deg, #ffe259, #ffa751);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-main);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* Header & Sticky Navigation */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-glass);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: rotate(15deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  box-shadow: 0 10px 25px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 242, 254, 0.45);
}

.btn-glass {
  background: var(--bg-glass);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* Sections Layout */
.section {
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-description {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Showcase Cards Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.showcase-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Image Showcase */
.media-preview-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.media-preview-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.media-preview-container:hover .media-preview-img {
  transform: scale(1.04);
}

/* HTML5 Video Showcase */
.video-wrapper {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-main);
  background: #000;
  position: relative;
}

.video-wrapper video {
  width: 100%;
  max-height: 550px;
  display: block;
  border-radius: var(--radius-lg);
}

/* AI Chat Section & Widgets */
.chat-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.chat-box {
  height: 520px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-header {
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.chat-messages {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-in-out;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-glass);
  display: flex;
  gap: 12px;
}

.chat-input {
  flex-grow: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.chat-send-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #040914;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.chat-send-btn:hover {
  transform: scale(1.08);
}

/* Preset Chips */
.preset-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-glow);
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Floating Chat Widget */
.floating-chat-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 242, 254, 0.4);
  z-index: 999;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.floating-chat-trigger:hover {
  transform: scale(1.1) rotate(5deg);
}

.floating-chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 380px;
  height: 520px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  animation: slideUp 0.3s ease-out forwards;
}

.floating-chat-window.active {
  display: flex;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.3);
  border: 1px solid var(--border-glass);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
}

/* Responsive Styles & Mobile Optimization */
@media (max-width: 768px) {
  /* Performance Optimization for Mobile GPUs */
  .glass-panel, .glass-card {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .navbar {
    width: 95%;
    padding: 10px 16px;
    position: fixed;
    top: 12px;
  }

  .nav-brand {
    font-size: 1.1rem;
  }

  .nav-controls {
    gap: 8px;
  }

  .nav-chat-btn {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
  }

  .mobile-menu-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 18px;
    flex-direction: column;
    gap: 14px;
    text-align: center;
    box-shadow: var(--shadow-main);
  }

  .nav-links.active {
    display: flex;
    animation: fadeIn 0.25s ease-out;
  }

  .hero {
    padding: 110px 16px 40px;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2.1rem, 8vw, 3rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .section {
    padding: 50px 16px;
  }

  .section-header {
    margin-bottom: 35px;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .section-description {
    font-size: 0.95rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .showcase-card {
    padding: 22px;
  }

  .media-preview-img {
    height: 220px;
  }

  .video-wrapper video {
    max-height: 280px;
  }

  .chat-box {
    height: 440px;
  }

  .chat-messages {
    padding: 16px;
  }

  .floating-chat-trigger {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }

  .floating-chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
    height: 440px;
  }
}

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

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