/* ==============================================================================
   kevvli community • Pure Stealth Dark UI Design System
   Minecraft Resource Pack Platform Stylesheet (Vercel / Linear / Modrinth Aesthetic)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&family=Press+Start+2P&display=swap');

/* --- TOKENY SYSTEMOWE & PALETA BARW --- */
:root {
  /* 3 warstwy tła: Base / Surface / Elevated */
  --bg-base: #030304;
  --bg-surface: #090a0f;
  --bg-elevated: #12131a;
  --bg-overlay: rgba(3, 3, 4, 0.94);

  /* 3 warstwy precyzyjnych obramowań (1px) */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Typografia i kontrast (spełniające WCAG AA) */
  --text-primary: #ededed;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Szmaragd jako jedyny główny akcent UI */
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --accent-border: rgba(16, 185, 129, 0.3);

  /* Dedykowane kolory platform zewnętrznych */
  --brand-youtube: #ff0000;
  --brand-tiktok: #fe2c55;
  --brand-discord: #5865f2;

  /* Stany ostrzegawcze i błędy */
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);

  /* Skala zaokrągleń */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Aliases dla kompatybilności */
  --kevvli-black: var(--bg-base);
  --kevvli-bg: var(--bg-base);
  --kevvli-surface: var(--bg-surface);
  --kevvli-card: var(--bg-surface);
  --kevvli-card-hover: var(--bg-elevated);
  --kevvli-border: var(--border-subtle);
  --kevvli-border-hover: var(--border-strong);
  --mc-emerald: var(--accent);
  --mc-emerald-glow: var(--accent-subtle);
}

/* --- RESET & PODSTAWY --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}

::selection {
  background-color: #27272a;
  color: #ffffff;
}

/* Widoczny, dostępny focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- FONT UTILITIES --- */
.font-pixel {
  font-family: 'Press Start 2P', cursive, monospace;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --- PASEK PRZEWIJANIA (SCROLLBAR) --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: #1c1d25;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #2b2c39;
}

/* --- WZORZEC TŁA & SUBTELNE GLOW --- */
.bg-grid-pattern {
  background-color: var(--bg-base);
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-radial-glow {
  background:
    radial-gradient(circle at 50% -15%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 15% 25%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    var(--bg-base);
}

/* --- NAGŁÓWEK NAWIGACYJNY (NAVBAR) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 64px;
  background-color: rgba(3, 3, 4, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  background-color: rgba(3, 3, 4, 0.98) !important;
  border-bottom-color: var(--border-default) !important;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.8);
}

/* --- KOMPONENTY NAWIGACJI (NAVBAR ACTIONS & LINKS) --- */
.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2rem; /* Dokładnie 32px */
  padding: 0 0.75rem;
  font-size: 0.75rem; /* 12px */
  font-weight: 500;
  color: #a1a1aa; /* zinc-400 */
  border-radius: 0.5rem; /* 8px */
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; /* 32px */
  height: 2rem; /* 32px */
  color: #a1a1aa;
  border-radius: 0.5rem; /* 8px */
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-icon-btn:hover {
  color: #5865f2;
  background-color: rgba(88, 101, 242, 0.1);
}

/* Przycisk Primary w Navbarze (Kreator TXT) - nowoczesny, proporcjonalny, bez bulwiastego owalu */
.nav-btn-creator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2rem; /* 32px */
  padding: 0 0.875rem;
  font-size: 0.75rem; /* 12px */
  font-weight: 700;
  color: #030304;
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  border-radius: 0.5rem; /* 8px - spójny ze wszystkimi komponentami */
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 12px rgba(16, 185, 129, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-btn-creator:hover {
  background: linear-gradient(180deg, #6ee7b7 0%, #34d399 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 18px rgba(16, 185, 129, 0.45);
}

.nav-btn-creator:active {
  transform: scale(0.98);
}

/* Przycisk Admina w Navbarze */
.nav-btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2rem; /* 32px */
  padding: 0 0.625rem;
  font-size: 0.75rem; /* 12px */
  font-weight: 500;
  color: #a1a1aa;
  background-color: rgba(24, 24, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem; /* 8px */
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-btn-admin:hover {
  color: #ededed;
  background-color: rgba(39, 39, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Responsywne kontenery nawigacji niezależne od Tailwinda */
.nav-desktop-only {
  display: flex !important;
}

.nav-mobile-only {
  display: none !important;
}

@media (max-width: 767px) {
  .nav-desktop-only {
    display: none !important;
  }
  .nav-mobile-only {
    display: flex !important;
  }
}

/* Mobilny panel wysuwany & tło */
.mobile-nav-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav-panel {
  display: block;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  padding: 1.25rem 1rem;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.95);
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.mobile-nav-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

@media (min-width: 768px) {
  .mobile-nav-backdrop,
  .mobile-nav-panel {
    display: none !important;
  }
}

/* Utility: ukrywanie scrollbara przy zachowaniu przewijania */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Nowoczesny select sortowania */
.filter-sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #090a0f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding: 0.375rem 2.25rem 0.375rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
}

.filter-sort-select:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-elevated);
}

.filter-sort-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* --- SKELETON LOADER & SHIMMER --- */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-box {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-md);
}

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

/* --- KARTA PACZKI TEKSTUR --- */
.pack-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              box-shadow 0.22s ease;
}

.pack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.95),
              0 0 20px -5px rgba(16, 185, 129, 0.1);
}

.pack-card.is-newest {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.pack-card.is-newest:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3),
              0 20px 40px -15px rgba(0, 0, 0, 0.95),
              0 0 25px -4px rgba(16, 185, 129, 0.25);
}

/* --- MINIATURKA PACZKI (16:9) --- */
.pack-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #06070a;
}

/* Wersja pozioma (YouTube i standardowe grafiki 16:9): wypełnia całą szerokość karty */
.pack-thumb--wide .pack-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pack-thumb--wide .pack-thumb-bg {
  display: none;
}

/* Wersja pionowa (TikTok 9:16): mieści się w całości z rozmytym tłem */
.pack-thumb--portrait .pack-thumb-bg {
  display: block;
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  object-fit: cover;
  transform: scale(1.2);
  filter: blur(12px) brightness(0.35) saturate(1.2);
  will-change: transform;
  contain: paint;
  transition: opacity 0.3s ease;
}

.pack-thumb--portrait .pack-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease-out;
}

.pack-card {
  contain: content;
}

.pack-card:hover .pack-thumb-img {
  transform: scale(1.04);
}

.pack-thumb-fade {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg-surface) 0%, rgba(9, 10, 15, 0.4) 25%, transparent 60%);
}

/* Okrągłe przyciski akcji na miniaturce */
.pack-action-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.pack-action-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.pack-action-btn.is-liked {
  color: #ef4444;
}

.pack-action-btn.is-danger {
  background: rgba(220, 38, 38, 0.85);
  border-color: rgba(248, 113, 113, 0.4);
  color: #ffffff;
}

.pack-action-btn.is-danger:hover {
  background: #dc2626;
  border-color: #f87171;
}

/* --- IKONY BRANDOWE (INLINE SVG) --- */
.brand-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: currentColor;
  transition: fill 0.15s ease, color 0.15s ease;
}

/* --- PRZYCISKI (BUTTONS) --- */
.mc-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  border: 1px solid transparent;
}

.mc-btn:active {
  transform: translateY(1px);
}

/* Primary emerald */
.mc-btn-emerald {
  background: var(--accent);
  color: #030304;
  font-weight: 700;
  border-color: #34d399;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.mc-btn-emerald:hover {
  background: #34d399;
  border-color: #6ee7b7;
  color: #030304;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

/* Ghost / Neutral */
.mc-btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.mc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-color: var(--border-default);
}

/* Discord (blurple) */
.mc-btn-discord {
  background: #5865f2;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9375rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-xl, 1rem);
  border-color: #6b76f5;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.28);
}

.mc-btn-discord:hover {
  background: #4752c4;
  border-color: #5865f2;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.42);
}

/* Kolor marki Discord dla ikon */
.discord-brand {
  color: #5865f2;
}

/* --- BADGES ROZDZIELCZOŚCI --- */
.badge-res {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-16x { background: #12131a; color: #a1a1aa; border: 1px solid #23242e; }
.badge-32x { background: #0e1726; color: #60a5fa; border: 1px solid #1e2d4a; }
.badge-64x { background: #0c1c15; color: #34d399; border: 1px solid #143828; }
.badge-128x { background: #181124; color: #c084fc; border: 1px solid #301f4a; }
.badge-256x { background: #20170a; color: #fbbf24; border: 1px solid #3d2c12; }
.badge-512x { background: #220e0e; color: #f87171; border: 1px solid #441818; }

/* --- DOSTĘPNY KOMPONENT CUSTOM SELECT --- */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
}

.custom-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: var(--border-strong);
  background-color: rgba(255, 255, 255, 0.03);
}

.custom-select-trigger.is-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.custom-select-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.custom-select-trigger.is-open .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.9);
  padding: 0.25rem;
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.custom-select-menu.is-open {
  display: flex;
  animation: dropdownIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  user-select: none;
}

.custom-select-option:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.custom-select-option.is-selected {
  color: var(--accent);
  background-color: var(--accent-subtle);
  font-weight: 600;
}

@keyframes dropdownIn {
  0% { opacity: 0; transform: scale(0.96) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- PASEK FILTRÓW I CENTROWANIE TABÓW --- */
.packs-filter-toolbar {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background-color: #090a0f;
  border: 1px solid rgba(39, 39, 42, 0.8);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .packs-filter-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
  }
}

.filter-toolbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.filter-toolbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.filter-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  width: 100%;
}

.category-tabs-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  background-color: #09090b;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.category-tab-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.category-tab-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.category-tab-btn.active {
  color: #ffffff;
  background-color: var(--bg-elevated);
  border-color: var(--border-default);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

/* --- MODAL I ANIMACJE --- */
.modal-backdrop {
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
}

.modal-content-anim {
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  0% {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- TOASTY --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast.toast-info {
  border-left-color: #3b82f6;
}

/* --- ELEMENTY MINECRAFT COLOR CODES --- */
.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.logo-glow {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-glow:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 2px 1px rgba(255, 255, 255, 0.3);
  transform: scale(1.03);
}

/* --- KOMPATYBILNOŚĆ SHADCN Z POPRZEDNIEGO PANELU --- */
.shadcn-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease;
}

.shadcn-tab-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.shadcn-tab-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
}

.shadcn-tab-btn.active {
  color: #ffffff;
  background-color: var(--bg-elevated);
  border-color: var(--border-default);
  font-weight: 600;
}

.shadcn-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.shadcn-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
  text-align: left;
}

.shadcn-table td {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.shadcn-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.shadcn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.shadcn-badge-emerald {
  background-color: var(--accent-subtle);
  border-color: var(--accent-border);
  color: #34d399;
}

.shadcn-badge-indigo {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: #818cf8;
}

/* --- ODTWARZACZ WIDEO W MODALU SZCZEGÓŁÓW PACZKI (YOUTUBE / TIKTOK) --- */
#modalVideoWrapper {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: #000000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#modalVideoWrapper.is-youtube {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
}

#modalVideoWrapper.is-tiktok {
  max-width: 100% !important;
  width: 100% !important;
  height: 500px !important;
  min-height: 400px !important;
  aspect-ratio: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #080a09 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0.75rem !important;
}

#modalVideoWrapper.is-tiktok iframe {
  position: relative !important;
  width: 282px !important;
  max-width: 100% !important;
  height: 500px !important;
  max-height: 100% !important;
  aspect-ratio: 9 / 16 !important;
  border: none !important;
  border-radius: 0.5rem !important;
  margin: 0 auto !important;
}

@media (max-width: 640px) {
  #modalVideoWrapper.is-tiktok {
    height: 440px !important;
    min-height: 360px !important;
  }
  #modalVideoWrapper.is-tiktok iframe {
    width: 248px !important;
    height: 440px !important;
  }
}

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