/* ============================================
   MINT-Games – Design System (main.css)
   ============================================ */

:root {
  /* Color Palette */
  --color-bg:        hsl(225, 20%, 8%);
  --color-surface:   hsl(225, 18%, 13%);
  --color-surface2:  hsl(225, 16%, 18%);
  --color-border:    hsl(225, 20%, 24%);

  --color-primary:   hsl(220, 90%, 62%);
  --color-primary-glow: hsla(220, 90%, 62%, 0.35);
  --color-secondary: hsl(162, 72%, 48%);
  --color-secondary-glow: hsla(162, 72%, 48%, 0.3);
  --color-accent:    hsl(38, 95%, 62%);
  --color-accent-glow: hsla(38, 95%, 62%, 0.3);
  --color-purple:    hsl(270, 80%, 68%);
  --color-purple-glow: hsla(270, 80%, 68%, 0.3);
  --color-danger:    hsl(0, 80%, 62%);
  --color-danger-glow: hsla(0, 80%, 62%, 0.3);

  --color-text:      hsl(220, 25%, 95%);
  --color-text-muted: hsl(220, 15%, 60%);
  --color-text-dim:  hsl(220, 12%, 45%);

  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px hsla(0,0%,0%,0.3);
  --shadow-md:  0 8px 24px hsla(0,0%,0%,0.4);
  --shadow-lg:  0 16px 48px hsla(0,0%,0%,0.5);
  --shadow-glow-primary: 0 0 32px var(--color-primary-glow);
  --shadow-glow-green:   0 0 32px var(--color-secondary-glow);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Touch targets (Apple HIG: min 44px) */
  --touch-min: 44px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100dvh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 20%, hsla(220, 80%, 40%, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, hsla(162, 72%, 40%, 0.10) 0%, transparent 60%);
}

/* ---- Utility Classes ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---- Glassmorphism Card ---- */
.glass-card {
  background: hsla(225, 18%, 13%, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* ---- Buttons ---- */
button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  outline: none;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

button:active {
  transform: scale(0.96);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

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

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(2deg); }
  66%       { transform: translateY(-6px) rotate(-2deg); }
}

.animate-fadein { animation: fadeIn var(--transition-slow) ease both; }
.animate-fadeinup { animation: fadeInUp 0.5s ease both; }
