/* ===== UTILITIES.CSS ===== */

/* Flexbox */
.flex   { display: flex; }
.flex-col  { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: var(--space-1); }
.gap-8  { gap: var(--space-2); }
.gap-12 { gap: var(--space-3); }
.gap-16 { gap: var(--space-4); }
.gap-24 { gap: var(--space-5); }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.mt-8  { margin-top: var(--space-2); }
.mt-12 { margin-top: var(--space-3); }
.mt-16 { margin-top: var(--space-4); }
.mt-24 { margin-top: var(--space-5); }
.mt-32 { margin-top: var(--space-6); }
.mb-8  { margin-bottom: var(--space-2); }
.mb-12 { margin-bottom: var(--space-3); }
.mb-16 { margin-bottom: var(--space-4); }
.mb-24 { margin-bottom: var(--space-5); }
.mb-32 { margin-bottom: var(--space-6); }
.p-0   { padding: 0; }

/* Text */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm  { font-size: 12px; }
.text-base{ font-size: 14px; }
.text-lg  { font-size: 18px; }
.text-xl  { font-size: 22px; }
.text-2xl { font-size: 28px; }
.text-muted { color: var(--text2); }
.text-dim   { color: var(--text3); }
.font-bold   { font-weight: 700; }
.font-head   { font-family: var(--font-head); }

/* Colors */
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-green   { color: var(--accent2); }
.text-purple  { color: #7c3aed; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Display */
.hidden { display: none !important; }
.block  { display: block; }
.inline-flex { display: inline-flex; }

/* Borders */
.rounded-sm { border-radius: var(--r-sm); }
.rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-full { border-radius: 9999px; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.select-none {
  -webkit-user-select: none;
  user-select: none;
}

/* Section title */
.section-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(94,196,212,0.15), transparent);
  max-width: 120px;
}

/* Separator */
.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94,196,212,0.18), rgba(131,189,69,0.12), transparent);
  margin: 24px 0;
  border: none;
}

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }

/* Gradient text */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Box shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* Smooth all */
.smooth { transition: all 0.2s; }

/* Soft hover elevation */
.neuron-hover {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.neuron-hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Synapse border — animated gradient top line */
.synapse-border {
  position: relative;
}
.synapse-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94,196,212,0.10), rgba(131,189,69,0.08), transparent);
  opacity: 0.7;
  pointer-events: none;
}

/* Input group */
.input-group { margin-bottom: 16px; }
.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hide top KPI cards on game pages */
.container > .kpi-grid.fade-up.delay-1,
.container > .mm-kpi-row.fade-up.delay-1,
.container > .cw-kpi-row.fade-up.delay-1 {
  display: none !important;
}

/* Laptop screens (1366px+) */
@media (min-width: 1366px) {
  .section-title {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .input-label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .text-sm  { font-size: 13px; }
  .text-base{ font-size: 15px; }
  .text-lg  { font-size: 19px; }
  .text-xl  { font-size: 24px; }
  .text-2xl { font-size: 30px; }
}

/* Large PC screens (1920px+) */
@media (min-width: 1920px) {
  .gap-4  { gap: calc(var(--space-1) * 1.1); }
  .gap-8  { gap: calc(var(--space-2) * 1.2); }
  .gap-12 { gap: calc(var(--space-3) * 1.2); }
  .gap-16 { gap: calc(var(--space-4) * 1.25); }
  .gap-24 { gap: calc(var(--space-5) * 1.3); }

  .mt-8  { margin-top: calc(var(--space-2) * 1.2); }
  .mt-12 { margin-top: calc(var(--space-3) * 1.2); }
  .mt-16 { margin-top: calc(var(--space-4) * 1.25); }
  .mt-24 { margin-top: calc(var(--space-5) * 1.3); }
  .mt-32 { margin-top: calc(var(--space-6) * 1.3); }
  .mb-8  { margin-bottom: calc(var(--space-2) * 1.2); }
  .mb-12 { margin-bottom: calc(var(--space-3) * 1.2); }
  .mb-16 { margin-bottom: calc(var(--space-4) * 1.25); }
  .mb-24 { margin-bottom: calc(var(--space-5) * 1.3); }
  .mb-32 { margin-bottom: calc(var(--space-6) * 1.3); }

  .section-title {
    font-size: 22px;
    margin-bottom: 20px;
    gap: 10px;
  }

  .input-label {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .text-sm  { font-size: 14px; }
  .text-base{ font-size: 16px; }
  .text-lg  { font-size: 20px; }
  .text-xl  { font-size: 26px; }
  .text-2xl { font-size: 32px; }

  .sep {
    margin: 28px 0;
  }
}
