/* ============ BASE.CSS — Variáveis, Reset, Tipografia ============ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Colors */
  --bg:        #07070f;
  --bg2:       #0b0b16;
  --card:      #0f0f1a;
  --card2:     #13131f;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);

  --accent:    #e8ff47;
  --accent-d:  #c8df30;
  --accent2:   #ff5252;
  --accent3:   #47c8ff;
  --accent4:   #b847ff;
  --accent5:   #47ff9c;

  --text:      #f0f0f8;
  --text2:     #9090a8;
  --text3:     #7474a0;

  /* Fonts */
  --font-title: 'Bebas Neue', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  --font-mono:  'Space Mono', monospace;

  /* Radii */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 20px rgba(232,255,71,0.25);
  --shadow-red:    0 0 20px rgba(255,82,82,0.25);
  --shadow-blue:   0 0 20px rgba(71,200,255,0.25);

  /* Z-index scale */
  --z-content: 1;
  --z-fab: 50;
  --z-nav: 100;
  --z-sheet: 150;
  --z-modal: 200;
  --z-settings: 300;
  --z-toast: 400;
  --z-splash: 500;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;

  /* Transitions */
  --t-fast:  0.15s ease;
  --t-base:  0.25s ease;
  --t-slow:  0.4s ease;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: var(--r-full); }

/* Focus indicator (accessibility — keyboard navigation) */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* Selection */
::selection { background: var(--accent); color: #000; }

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  letter-spacing: 0.03em;
  line-height: 1.1;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { line-height: 1.6; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
a:hover { opacity: 0.8; }

/* Utility classes */
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-accent3 { color: var(--accent3); }
.text-accent4 { color: var(--accent4); }
.text-muted   { color: var(--text2); }
.text-dim     { color: var(--text3); }
.text-mono    { font-family: var(--font-mono); }
.text-title   { font-family: var(--font-title); }
.text-sm      { font-size: 0.8rem; }
.text-xs      { font-size: 0.7rem; }
.text-center  { text-align: center; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-1       { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm       { gap: var(--sp-sm); }
.gap-md       { gap: var(--sp-md); }
.gap-lg       { gap: var(--sp-lg); }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.relative { position: relative; }
.hidden  { display: none !important; }
.pointer { cursor: pointer; }

.p-md { padding: var(--sp-md); }
.p-lg { padding: var(--sp-lg); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-md { margin-bottom: var(--sp-md); }

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.z1 { position: relative; z-index: 1; }
