:root {
  /* Colors */
  --color-bg: #050608; /* deep black */
  --color-surface: #10131a;
  --color-surface-elevated: #151925;
  --color-text: #f5f7ff;
  --color-text-muted: #a4afc4;
  --color-primary: #05c2ff; /* electric blue */
  --color-primary-soft: rgba(5, 194, 255, 0.12);
  --color-success: #2fd17a; /* evolution / growth */
  --color-warning: #ffb347; /* amber */
  --color-danger: #ff4b3e; /* volcanic magma */
  --color-accent-jungle: #1fad5f; /* jungle green */
  --color-accent-volcanic: #ff6a00; /* volcanic orange */
  --color-accent-amber: #ffcc33; /* amber yellow */
  --color-accent-lab: #a2b4c8; /* metallic gray tint */

  /* Neutral grays */
  --gray-50: #0b0d11;
  --gray-100: #151821;
  --gray-200: #1d2230;
  --gray-300: #262d3e;
  --gray-400: #343d52;
  --gray-500: #4a5672;
  --gray-600: #6a7691;
  --gray-700: #8e9bbb;
  --gray-800: #bcc6dd;
  --gray-900: #e5ebf8;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-display: "Rajdhani", "Segoe UI", system-ui, sans-serif; /* futuristic */

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */
  --font-size-6xl: 3.75rem;  /* 60px - hero titles */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 14px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radius */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Shadows - cinematic, layered */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-elevated: 0 18px 45px rgba(0, 0, 0, 0.7);
  --shadow-glow-primary: 0 0 25px rgba(5, 194, 255, 0.55);
  --shadow-glow-volcanic: 0 0 30px rgba(255, 106, 0, 0.6);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-width: 1120px;
  --container-width-wide: 1320px;
  --page-padding-x: var(--space-16);
  --page-padding-x-mobile: var(--space-8);

  /* Focus */
  --focus-ring-color: rgba(5, 194, 255, 0.85);
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--focus-ring-color);
}

/* ========================================
   RESET & NORMALIZE
   ===================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: "";
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
}

button {
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

input,
textarea,
select {
  outline: none;
}

/* Remove default link underlines & color; handled in base styles */
a {
  text-decoration: none;
  color: inherit;
}

/* ========================================
   BASE STYLES
   ===================================== */
body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #141a27 0, #050608 50%, #020308 100%);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

h1 {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

a {
  position: relative;
  color: var(--color-primary);
  transition: color var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-jungle), var(--color-primary));
  box-shadow: 0 0 10px rgba(5, 194, 255, 0.7);
  transition: width var(--transition-base);
}

a:hover::after,
a:focus-visible::after {
  width: 100%;
}

code,
pre {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.9em;
}

hr {
  border: none;
  border-top: 1px solid var(--gray-400);
  margin: var(--space-16) 0;
}

/* Hungarian language-specific nuance: tighten headings for compact UI */
html[lang="hu"] h1,
html[lang="hu"] h2 {
  word-spacing: 0.08em;
}

/* ========================================
   ACCESSIBILITY & REDUCED MOTION
   ===================================== */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

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

/* ========================================
   UTILITIES
   ===================================== */

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding-x-mobile);
  padding-right: var(--page-padding-x-mobile);
}

.container--wide {
  max-width: var(--container-width-wide);
}

@media (min-width: 768px) {
  .container,
  .container--wide {
    padding-left: var(--page-padding-x);
    padding-right: var(--page-padding-x);
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-end {
  justify-content: flex-end;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-10 {
  gap: var(--space-10);
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-gap-4 {
  gap: var(--space-4);
}

.grid-gap-6 {
  gap: var(--space-6);
}

.grid-gap-8 {
  gap: var(--space-8);
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Spacing utilities (y-axis) */
.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section--dense {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--xl {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mt-12 {
  margin-top: var(--space-12);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-12 {
  margin-bottom: var(--space-12);
}

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

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

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cinematic overlays and glows for hero/arena sections */
.glow-primary {
  box-shadow: var(--shadow-glow-primary);
}

.glow-volcanic {
  box-shadow: var(--shadow-glow-volcanic);
}

.bg-blur-panel {
  backdrop-filter: blur(16px);
  background: linear-gradient(
    135deg,
    rgba(10, 15, 25, 0.95),
    rgba(14, 22, 36, 0.94)
  );
}

/* ========================================
   COMPONENTS
   ===================================== */

/* Buttons - primary CTA: download / battle / evolve */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  position: relative;
  overflow: hidden;
  color: var(--color-text);
  background: radial-gradient(circle at 0 0, #242f3f 0, #10131a 40%, #050608 100%);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #05c2ff, #1fad5f, #ff6a00);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity var(--transition-base);
}

.btn > span,
.btn > svg {
  position: relative;
  z-index: 1;
}

.btn--primary {
  background: linear-gradient(135deg, #05c2ff, #1fad5f);
  color: #020308;
  border-color: rgba(5, 194, 255, 0.7);
  box-shadow: 0 12px 35px rgba(5, 194, 255, 0.45);
}

.btn--danger {
  background: linear-gradient(135deg, #ff6a00, #ff4b3e);
  color: #050608;
  border-color: rgba(255, 106, 0, 0.9);
  box-shadow: 0 12px 35px rgba(255, 106, 0, 0.55);
}

.btn--ghost {
  background: rgba(10, 14, 24, 0.7);
  border-color: rgba(162, 180, 200, 0.5);
  color: var(--color-text);
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--shadow-elevated);
}

.btn:hover::before,
.btn:focus-visible::before {
  opacity: 0.27;
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--shadow-soft);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Inputs - for login, registration, promo codes, search, etc. */
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(162, 180, 200, 0.45);
  background: rgba(7, 10, 18, 0.96);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  box-shadow: 0 0 0 1px rgba(5, 194, 255, 0);
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}

.form-control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

.form-control:focus-visible {
  border-color: rgba(5, 194, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(5, 194, 255, 0.85);
  background: rgba(10, 16, 28, 0.98);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-700);
}

.form-helper {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card - used for dinosaur cards, battle modes & rewards panels */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at top left, #1a202f 0, #10131a 45%, #050608 100%);
  border: 1px solid rgba(162, 180, 200, 0.32);
  box-shadow: var(--shadow-soft);
  padding: var(--space-12);
  color: var(--color-text);
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    135deg,
    rgba(5, 194, 255, 0.3),
    rgba(31, 173, 95, 0.15),
    rgba(255, 106, 0, 0.25)
  );
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.card:hover::before {
  opacity: 0.45;
}

.card--compact {
  padding: var(--space-8);
}

.card-header {
  margin-bottom: var(--space-6);
}

.card-title {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Tag-like badges for rarity, PvP, rewards, etc. */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(162, 180, 200, 0.6);
  background: rgba(5, 10, 18, 0.9);
  color: var(--gray-800);
}

.badge--rare {
  border-color: rgba(5, 194, 255, 0.8);
  color: var(--color-primary);
}

.badge--epic {
  border-color: rgba(255, 106, 0, 0.9);
  color: var(--color-accent-amber);
}

.badge--muted {
  border-color: rgba(162, 180, 200, 0.35);
  color: var(--color-text-muted);
}

/* Cinematic section heading pattern for collections, modes, etc. */
.section-heading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.section-heading__label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-amber);
}

.section-heading__divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 204, 51, 0.7), transparent);
}

.section-heading__title {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
}

@media (max-width: 640px) {
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading__divider {
    width: 100%;
  }
}

/* Hero-style overlay band for epic arena & cinematic backgrounds */
.hero-overlay {
  position: relative;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at bottom,
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0.9)
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Simple pill navigation chips for battle modes and filters */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(162, 180, 200, 0.5);
  background: rgba(7, 10, 18, 0.9);
  font-size: var(--font-size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast);
}

.chip--active {
  background: radial-gradient(circle at 0 0, #05c2ff 0, #1fad5f 40%, #10131a 100%);
  border-color: rgba(5, 194, 255, 0.9);
  color: #020308;
}

.chip:hover {
  transform: translateY(-1px);
}

/* Timeline-like progress bar for evolution systems */
.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 20, 30, 0.9);
  overflow: hidden;
}

.progress-bar__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #1fad5f, #05c2ff, #ffcc33);
  box-shadow: 0 0 18px rgba(31, 173, 95, 0.8);
  transition: width var(--transition-slow);
}

/* Toast / notification base for daily rewards, events */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-16);
  transform: translateX(-50%);
  max-width: 420px;
  width: calc(100% - 2 * var(--page-padding-x-mobile));
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-lg);
  background: rgba(8, 12, 22, 0.96);
  border: 1px solid rgba(255, 204, 51, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  z-index: 60;
}

.toast__icon {
  flex-shrink: 0;
}

.toast__content {
  flex: 1;
  font-size: var(--font-size-sm);
}

.toast__title {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-1);
}

.toast__close {
  margin-left: var(--space-4);
}

@media (min-width: 640px) {
  .toast {
    width: auto;
  }
}

/* End of base cinematic prehistoric-futuristic stylesheet */
