/* ==========================================================================
   IYI SOLUTION - MAIN GLOBAL STYLES & FOUNDATIONS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-black);
  color: var(--text-titanium);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Cyber Grid & Metallic Radial Lighting */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(163, 230, 53, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 90% 40%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Interactive Cursor Ambient Glow */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.07) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: transparent;
}

button {
  cursor: pointer;
  user-select: none;
}

ul, ol {
  list-style: none;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 2;
}

/* Metallic Badges & Pills */
.badge-lime {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lime-glow);
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid var(--lime-border);
  border-radius: var(--radius-full);
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.15);
  backdrop-filter: blur(10px);
}

.badge-lime .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime-primary);
  box-shadow: 0 0 10px var(--lime-primary);
  animation: pulse-glow 2s infinite ease-in-out;
}

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

/* Metallic Shimmering Gradient Buttons */
.btn-metallic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  color: #040804;
  background: var(--grad-lime-metallic);
  border-radius: var(--radius-md);
  border: 1px solid #d9f99d;
  box-shadow: 0 4px 20px rgba(163, 230, 53, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.btn-metallic::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--grad-lime-sheen);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
}

.btn-metallic:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(163, 230, 53, 0.55), inset 0 1px 0 #ffffff;
}

.btn-metallic:hover::before {
  left: 200%;
}

.btn-metallic:active {
  transform: translateY(0);
}

.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--lime-primary);
  color: var(--lime-glow);
  box-shadow: var(--glow-lime-sm);
  transform: translateY(-2px);
}

/* Glassmorphic Cards with Metallic Rim */
.glass-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(163, 230, 53, 0), rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-card:hover {
  border-color: var(--lime-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), var(--glow-lime-sm);
  transform: translateY(-4px);
}

/* Custom Metallic Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
  background: #27382b;
  border-radius: 4px;
  border: 1px solid rgba(163, 230, 53, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lime-deep);
}

/* View State Management for SPA */
.app-view {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  position: relative;
  z-index: 2;
  padding-top: 140px; /* Space for Top Command Dock */
  min-height: calc(100vh - 100px);
}

.app-view.active-view {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--lime-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--glow-lime-sm);
  color: var(--text-white);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  backdrop-filter: blur(16px);
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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