/* ==================================================================
   Gamer Tips Pro Base Styles (base.css)
   Modern, content-focused gaming portal – Polish language
   ================================================================== */

/* ==================================================================
   1. CSS VARIABLES
   ================================================================== */
:root {
  /* Color Palette */
  --color-bg: #050914;                /* Dark, subtle gaming backdrop */
  --color-surface: #0d1324;           /* Card / panel background */
  --color-surface-alt: #151b30;
  --color-text: #f5f7ff;              /* Primary text */
  --color-text-muted: #b6bed8;

  --color-primary: #4f46e5;           /* Main accent (indigo) */
  --color-primary-soft: rgba(79, 70, 229, 0.12);
  --color-primary-strong: #3730a3;

  --color-success: #22c55e;
  --color-warning: #facc15;
  --color-danger: #ef4444;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", 
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, 
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font Sizes (rem) */
  --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 */

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing Scale (px) */
  --space-0: 0;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 18px 45px rgba(15, 23, 42, 0.8);

  /* Transitions */
  --duration-quick: 120ms;
  --duration-normal: 180ms;
  --duration-slow: 240ms;
  --easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-quick: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
ul, ol, dl {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style-position: outside;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

img { height: auto; }

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

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

:focus {
  outline: none;
}

/* ==================================================================
   3. BASE STYLES
   ================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #111827 0, #050914 55%, #020617 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings – slightly futuristic, content-focused */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--gray-50);
}

h1 {
  font-size: clamp(2.25rem, 2.4vw + 1.8rem, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.75rem, 1.4vw + 1.4rem, 2.25rem);
  margin-bottom: var(--space-12);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-8);
}

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

strong {
  font-weight: 600;
}

/* Links – accented with primary color, minimal underline */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--easing-standard);
}

a:hover {
  color: var(--color-primary-strong);
}

a:active {
  color: var(--color-primary-strong);
}

/* Code snippets (for game configs, commands, etc.) */
code, pre {
  font-family: var(--font-mono);
}

pre {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  overflow-x: auto;
  font-size: var(--font-size-sm);
}

/* Lists */
ul, ol {
  padding-left: 1.25rem;
  margin-bottom: var(--space-12);
  color: var(--color-text-muted);
}

/* ==================================================================
   4. ACCESSIBILITY & FOCUS STYLES
   ================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Screen-reader only utility */
.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;
}

/* ==================================================================
   5. UTILITIES
   ================================================================== */

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 1200px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

/* Alignment & spacing utilities (minimal set) */
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }

.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.py-32 { padding-top: var(--space-32); padding-bottom: var(--space-32); }
.py-48 { padding-top: var(--space-48); padding-bottom: var(--space-48); }

/* Badges / category labels (e.g. Beginner Guides, Advanced) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: var(--gray-100);
}

.badge--primary {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--gray-50);
}

/* ==================================================================
   6. BASIC COMPONENTS
   ================================================================== */

/* Buttons – primary CTA, secondary, ghost */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--duration-normal) var(--easing-standard),
    color var(--duration-normal) var(--easing-standard),
    border-color var(--duration-normal) var(--easing-standard),
    box-shadow var(--duration-normal) var(--easing-standard),
    transform var(--duration-quick) var(--easing-standard);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  border-color: rgba(129, 140, 248, 0.6);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.4), var(--shadow-soft);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-strong), #6d28d9);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6), var(--shadow-elevated);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--gray-50);
}

.btn-secondary:hover {
  background: rgba(30, 64, 175, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--gray-50);
}

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

.btn:focus-visible {
  outline: 2px solid #e5e7eb;
  outline-offset: 2px;
}

/* Inputs – search, newsletter, contact forms */
.input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--duration-normal) var(--easing-standard),
    box-shadow var(--duration-normal) var(--easing-standard),
    background-color var(--duration-normal) var(--easing-standard);
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-500);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.7);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Cards – for Featured Tips, Trending Guides, FAQ blocks, etc. */
.card {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--easing-standard);
}

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

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

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: 4px;
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

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

/* FAQ summary/question accent */
.faq-item summary {
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Tag / pill for categories like "Poradniki dla początkujących" */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: var(--font-size-xs);
  color: var(--gray-100);
}

/* ==================================================================
   7. SECTION SHELLS (for key portal areas)
   ================================================================== */

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

.section-header {
  margin-bottom: var(--space-24);
}

.section-eyebrow {
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.section-title {
  font-size: clamp(1.5rem, 1.2vw + 1.2rem, 2rem);
}

.section-description {
  max-width: 640px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Featured / hero area for top tips */
.hero {
  padding-top: var(--space-64);
  padding-bottom: var(--space-64);
}

.hero-highlight {
  font-size: var(--font-size-sm);
  color: var(--gray-300);
}

.hero-title {
  font-size: clamp(2.4rem, 3vw + 1.8rem, 3.2rem);
  margin-bottom: var(--space-16);
}

.hero-subtitle {
  max-width: 640px;
  color: var(--color-text-muted);
}

/* ==================================================================
   8. MISC
   ================================================================== */

/* Simple divider */
.hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin: var(--space-24) 0;
}

/* Small text, e.g. disclaimers about affiliate links */
.text-xs {
  font-size: var(--font-size-xs);
}

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

/* End of base.css */
