/* ============================================================
   DESIGN SYSTEM & GLOBAL VARIABLES
   ============================================================ */
:root {
  --bg-deep: #0a0b10;
  --bg-surface: rgba(18, 20, 29, 0.75);
  --bg-card: rgba(23, 26, 38, 0.85);
  --bg-card-hover: rgba(32, 37, 56, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.35);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);

  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   BASE RESET & TYPOGRAPHY
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0a0b10;
  background-image: 
    radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 80% 35%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 15% 75%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #2a2e45;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Usunięcie obciążających telefon wielkich blurów */
.ambient-glow {
  display: none !important;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 24px 35px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: #a5b4fc;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-title-icon {
  width: clamp(42px, 5.5vw, 64px);
  height: clamp(42px, 5.5vw, 64px);
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 6px 16px rgba(251, 191, 36, 0.45));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}

.hero-title-icon:hover {
  transform: scale(1.22) rotate(-10deg);
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  user-select: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7174f8, #5b53ed);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.55);
}

.glow-btn {
  position: relative;
  overflow: hidden;
}

.glow-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.glow-btn:hover::after {
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.15rem;
}

/* ============================================================
   MAIN WRAPPER & CONTROLS
   ============================================================ */
.main-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.controls-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.6;
}

.search-box input {
  width: 100%;
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 44px 13px 48px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(10, 11, 16, 0.85);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 6px;
  transition: var(--transition-smooth);
}

.clear-btn:hover {
  color: var(--text-main);
}

/* Filters: Players, Status & Sort */
.secondary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.select-wrapper label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-wrapper select {
  background: rgba(13, 15, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 8px 34px 8px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
  transition: border-color 0.2s, background-color 0.2s, background-image 0.15s, box-shadow 0.2s;
}

.select-wrapper select:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background-color: rgba(20, 24, 36, 0.95);
}

.select-wrapper select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background-color: #111420;
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
  /* Strzałka obraca się o 180 stopni w górę przy wyborze opcji */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 15 12 9 18 15'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Stats Bar */
.status-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 0 4px;
}


/* ============================================================
   GAMES GRID & CARDS
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}

.game-card {
  background: #141724;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  contain: content;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent-primary)), transparent);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.game-card:hover {
  background: #1a1e30;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.game-card:hover::before {
  opacity: 1;
  height: 4px;
}

.game-card-banner-wrapper {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #0d0f17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-placeholder {
  background: linear-gradient(135deg, #181b2e 0%, #0d0f17 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-placeholder::before {
  content: '';
  width: 56px;
  height: 56px;
  background: url('logo.png') no-repeat center / contain;
  opacity: 0.35;
}

.game-card-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(13, 15, 23, 0.8) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: default;
  pointer-events: none;
  transition: var(--transition-smooth);
}

body.edit-mode-active .banner-status-badge {
  cursor: pointer;
  pointer-events: auto;
}

body.edit-mode-active .banner-status-badge:hover {
  filter: brightness(1.2);
}

.game-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}

.card-top {
  display: block;
  width: 100%;
}

.game-title-group {
  display: block;
  width: 100%;
}

.game-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  transition: font-size 0.2s;
}

.game-name.title-compress-sm {
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.game-name.title-compress-xs {
  font-size: 1.0rem;
  letter-spacing: -0.03em;
}

button.game-badge,
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
}

button.game-badge:hover,
.game-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.2);
}

.status-unplayed {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  color: #bfdbfe !important;
}

.status-in-progress {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  color: #f3e8ff !important;
}

.status-completed {
  background: rgba(34, 197, 94, 0.16) !important;
  border-color: rgba(74, 222, 128, 0.4) !important;
  color: #bbf7d0 !important;
}

.status-abandoned {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
}

.game-description {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rage-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.rage-flames {
  letter-spacing: 2px;
}

.game-meta-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  width: 100%;
  margin-top: auto;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.meta-item.meta-size strong {
  color: #38bdf8;
}

.meta-item.meta-author strong {
  color: #c084fc;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.tag-badge:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.card-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vote-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 5px 11px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
}

.vote-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.vote-pill.voted {
  background: rgba(236, 72, 153, 0.2);
  border-color: var(--accent-pink);
  color: #ff70ba;
}

.steam-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.steam-link-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 500px;
  margin: 40px auto;
}

.empty-emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ============================================================
   MODALS & ROULETTE
   ============================================================ */
[hidden] {
  display: none !important;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.88);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

.modal-content {
  background: #151722;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  width: 100%;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalScale {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 20;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.modal-header {
  padding: 28px 28px 16px;
  text-align: center;
}

.modal-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ROULETTE SPECIFIC */
.roulette-box {
  max-width: 580px;
  padding-bottom: 28px;
}

.roulette-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-pink);
  margin-bottom: 6px;
}

.slot-machine-container {
  position: relative;
  padding: 20px 28px;
}

.slot-pointer {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  z-index: 5;
  filter: drop-shadow(0 2px 8px #f43f5e);
  animation: bouncePointer 1s infinite alternate;
}

@keyframes bouncePointer {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(4px); }
}

.slot-window {
  height: 90px;
  background: #090a10;
  border: 2px solid var(--accent-primary);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9), 0 0 15px rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.slot-window::before, .slot-window::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 25px;
  pointer-events: none;
  z-index: 2;
}

.slot-window::before {
  top: 0;
  background: linear-gradient(to bottom, #090a10, transparent);
}

.slot-window::after {
  bottom: 0;
  background: linear-gradient(to top, #090a10, transparent);
}

.slot-strip {
  display: flex;
  flex-direction: column;
  transition: transform 4s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.slot-item {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  padding: 0 15px;
  text-align: center;
}

/* Winner Card */
.winner-card {
  margin: 10px 28px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  animation: popWinner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popWinner {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.winner-confetti {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.winner-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.winner-title-row h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
}

.winner-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.winner-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.winner-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-footer-centered {
  display: flex;
  justify-content: center;
  padding: 10px 28px 0;
}

/* FORM BOX & SPATIOUS CREATOR */
.form-box {
  max-width: 860px;
  width: 92%;
  padding: 34px 42px;
}

.form-box .modal-header {
  padding: 0 0 16px 0;
  text-align: left;
}

.form-box .modal-header h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.form-box .modal-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

#add-game-form,
#edit-game-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  width: 100%;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0d0f17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  height: 48px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 42px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea {
  height: 85px;
  min-height: 85px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background-color: #111420;
}

.form-group select:focus {
  background-color: #111420;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 15 12 9 18 15'%3e%3c/polyline%3e%3c/svg%3e");
}

/* WBUDOWANY PRZYCISK POBIERANIA ZE STEAM */
.input-inline-btn-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-inline-btn-wrapper input {
  padding-right: 120px !important;
}

.inline-steam-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.inline-steam-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  filter: brightness(1.1);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.inline-steam-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 18px;
  width: 100%;
  align-items: start;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  width: 100%;
  align-items: start;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  align-items: start;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.form-actions-right {
  display: flex;
  gap: 12px;
}

.btn-danger-outline {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fff;
}

.card-edit-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 6px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

body.edit-mode-active .card-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-edit-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(26, 30, 46, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(99, 102, 241, 0.3);
  font-size: 0.92rem;
  font-weight: 500;
  z-index: 2000;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(25px) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.footer strong {
  color: #f472b6;
}

.footer-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.95rem;
}

.footer-femboy-img {
  height: 56px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  vertical-align: middle;
  position: relative;
  top: -11px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(244, 114, 182, 0.45));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s;
  display: inline-block;
  cursor: pointer;
}

.footer-femboy-img:hover {
  transform: scale(1.15) rotate(6deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(244, 114, 182, 0.85));
}

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition-smooth);
}

.link-btn:hover {
  color: var(--text-main);
}

#toggle-edit-mode-btn.active {
  color: #fbbf24;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
  .hero-container {
    padding: 35px 16px 20px;
  }

  .main-wrapper {
    padding: 0 14px 50px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-row,
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-box {
    padding: 24px 18px;
    max-height: 94vh;
  }

  .steam-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .steam-input-row .btn-steam {
    width: 100%;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .form-actions-right {
    width: 100%;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .form-actions .btn,
  .form-actions-right .btn {
    width: 100%;
  }

  .secondary-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .select-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .select-wrapper select {
    flex: 1;
  }

  /* Płynny scroll na telefonach - brak zbędnych hoverów dotykowych */
  .game-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
}
