/* ╔═══════════════════════════════════════════════════════════╗
   ║  GameBooster Global Styles & Theme System                ║
   ╚═══════════════════════════════════════════════════════════╝ */

/* ── CSS Custom Properties (Light & Dark Mode) ── */
:root {
  /* Light Mode (Default) */
  --bg: #f5f7fa;
  --bg-secondary: #ffffff;
  --card: rgba(255,255,255,0.9);
  --accent: #00e5ff;
  --accent2: #7b61ff;
  --green: #00ffaa;
  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --muted: rgba(100,100,120,0.4);
  --border: rgba(0,0,0,0.08);
  --surface: #ffffff;
  --surface-variant: #f0f2f5;
  --shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"],
[data-theme="dark"] :root {
  /* Dark Mode */
  --bg: #04060d;
  --bg-secondary: #0a0e1a;
  --card: rgba(10,14,26,0.85);
  --accent: #00e5ff;
  --accent2: #7b61ff;
  --green: #00ffaa;
  --text: #e8eaf0;
  --text-secondary: #c8d2e6;
  --muted: rgba(200,210,230,0.45);
  --border: rgba(0,229,255,0.12);
  --surface: #141419;
  --surface-variant: #1a1f2e;
  --shadow: rgba(0,0,0,0.3);
}

/* ── Global Styles ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Background Grid & Orbs ── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,229,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .bg-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: orbFloat 10s ease-in-out infinite alternate;
}

.bg-orb-1 {
  width: 700px;
  height: 700px;
  top: -200px;
  left: -200px;
  background: rgba(0,229,255,0.055);
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  right: -100px;
  background: rgba(123,97,255,0.06);
  animation-delay: -4s;
}

.bg-orb-3 {
  width: 400px;
  height: 400px;
  top: calc(50% - 200px);
  left: calc(50% - 200px);
  background: rgba(0,255,170,0.03);
  animation-delay: -7s;
}

@keyframes orbFloat {
  from { transform: scale(1) translate(0,0); }
  to { transform: scale(1.15) translate(20px,-20px); }
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

[data-theme="dark"] nav {
  background: rgba(4,6,13,0.7);
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand span {
  color: var(--accent);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,229,255,0.1);
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(0,229,255,0.2);
  transform: scale(1.1);
}

/* ── Buttons ── */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  box-shadow: 0 8px 24px rgba(0,229,255,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,229,255,0.4);
}

.btn-secondary {
  background: var(--surface-variant);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--shadow);
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

input,
textarea,
select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}

input::placeholder {
  color: var(--muted);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 100%;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-success {
  border-left: 4px solid var(--green);
}

.toast-error {
  border-left: 4px solid #ff4757;
}

.toast-info {
  border-left: 4px solid var(--accent);
}

/* ── Utility Classes ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 20px;
}

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

.text-muted {
  color: var(--text-secondary);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .section {
    padding: 40px 16px;
  }

  .bg-orb {
    filter: blur(60px);
    opacity: 0.3;
  }

  #toast-container {
    left: 10px;
    right: 10px;
  }

  .toast {
    min-width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
