/* ============================================================
   MULTILOS — SHARED CSS
   Jedyne źródło prawdy dla: resetu, navbaru, stopki, przycisków,
   tagów/badge'y, progress-barów, pól formularzy i animacji.
   Style unikalne dla pojedynczej podstrony żyją w app.css.
   ============================================================ */

/* ── ZMIENNE ── */
:root {
  --purple-main:   #6c3fff;
  --purple-dark:   #1a0a3b;
  --purple-mid:    #2d1282;
  --purple-bright: #8b5cf6;
  --purple-soft:   #ede9fe;
  --purple-accent: #a78bfa;
  --border:        #e5e7eb;
  --text:          #1f2937;
  --muted:         #6b7280;
  --light-bg:      #f4f4f8;
  --white:         #fff;
  --green:         #10b981;
  --red:           #ef4444;
  --orange:        #f59e0b;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Siatka bezpieczeństwa — .app-navbar jest position:fixed (zawsze = szerokość
   viewportu), więc gdyby jakiś element w treści strony wymusił poziomy
   scroll (np. rząd tabów bez zawijania na wąskim ekranie), navbar zostaje
   na miejscu, a reszta strony przesuwa się pod nim — wygląda jakby "header
   był szerszy". overflow-x:hidden na html/body wycina taki scroll u źródła. */
html { overflow-x: hidden; }
body { font-family: ui-sans-serif, system-ui, sans-serif; background: var(--light-bg); padding-top: 56px; overflow-x: hidden; }

/* ── APP NAVBAR (białe podstrony) ── */
.app-navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid var(--border);
  height: 56px; display: flex; align-items: center;
}
.app-navbar .inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.nav-brand .nav-logo { height: 34px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links  { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  color: var(--text); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; padding: 6px 14px; border-radius: 8px; transition: background 0.15s;
}
.nav-links a:hover  { background: #f8f7ff; }
.nav-links a.active { background: var(--purple-soft); color: var(--purple-main); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--purple-main), var(--purple-accent));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.nav-name { font-size: 0.875rem; font-weight: 600; color: var(--text); }

@media (max-width: 640px) {
  .nav-links a span { display: none; }
  .nav-links a { padding: 6px 10px; }
  .nav-name { display: none; }
  .app-navbar .inner { padding: 0 16px; }
}

/* ── DROPDOWN ── */
.app-dropdown {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.app-dropdown .dropdown-item {
  color: var(--text); border-radius: 8px;
  padding: 9px 14px; font-size: 0.88rem; transition: all 0.15s;
}
.app-dropdown .dropdown-item:hover { background: #f8f7ff; }
.app-dropdown .dropdown-item.text-danger { color: var(--red) !important; }
.app-dropdown .dropdown-item.text-danger:hover { background: #fee2e2; }
.app-dropdown .dropdown-divider { border-color: var(--border); margin: 4px 6px; }

/* ── FOOTER ── */
.page-footer { background: #0c0518; padding: 40px 0 20px; position: relative; overflow: hidden; }
.footer-watermark { position: absolute; bottom: -60px; right: -30px; height: 280px; width: auto; fill: #fff; opacity: 0.05; transform: rotate(-12deg); pointer-events: none; z-index: 0; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.footer-brand-col .footer-logo { height: 28px; width: auto; margin-bottom: 14px; }
.footer-tagline { color: rgba(255,255,255,0.5); font-size: 0.85rem; font-weight: 300; line-height: 1.6; max-width: 260px; margin: 0 0 18px; }
.footer-trust { display: flex; flex-direction: column; gap: 10px; }
.footer-trust span, .footer-trust a {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.55); font-size: 0.78rem; font-weight: 600; text-decoration: none;
}
.footer-trust a:hover { color: #fff; }
.footer-col-title { color: rgba(255,255,255,0.4); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col a { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,0.55); font-size: 0.85rem; text-decoration: none; margin-bottom: 11px; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-col a i { font-size: 0.85rem; width: 16px; text-align: center; opacity: 0.65; }
.footer-game-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-game-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); font-size: 0.78rem; padding: 5px 10px; border-radius: 6px; }
.footer-game-badge i { font-size: 0.78rem; opacity: 0.65; }
.footer-bottom { text-align: center; color: rgba(255,255,255,0.4); font-size: 0.82rem; margin-bottom: 14px; }
.footer-disclaimer { font-size: 0.72rem; color: rgba(255,255,255,0.25); text-align: center; line-height: 1.6; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-watermark { display: none; }
}

/* ── FIOLETOWY HERO — WSPÓLNE ELEMENTY WEWNĘTRZNE (ikona/tytuł/opis) ── */
/* Same tło/blob/padding definiuje każda podstrona osobno w app.css (faq-hero/contact-hero/legal-hero/dash-header/group-header/create-header/groups-page-header) */
.hero-icon { width: 56px; height: 56px; background: rgba(255,255,255,0.1); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #a78bfa; font-size: 1.5rem; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: #fff; margin-bottom: 14px; }
.hero-sub { color: rgba(255,255,255,0.65); font-size: 1rem; line-height: 1.6; margin-bottom: 28px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.6); font-size: 0.85rem; text-decoration: none;
  margin-bottom: 16px; transition: color 0.15s;
}
.back-link:hover { color: #fff; }

/* ── PRZYCISKI ── */
.btn-primary {
  background: var(--purple-main); color: #fff; border: none;
  border-radius: 10px; padding: 10px 20px;
  font-weight: 700; font-size: 0.875rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: background 0.15s; font-family: inherit;
}
.btn-primary:hover { background: #5a32d4; color: #fff; }
.btn-outline {
  background: transparent; color: var(--purple-main);
  border: 1.5px solid var(--purple-main); border-radius: 10px;
  padding: 10px 20px; font-weight: 700; font-size: 0.875rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: all 0.15s; font-family: inherit;
}
.btn-outline:hover { background: var(--purple-soft); color: var(--purple-main); }
.btn-white {
  background: #fff; color: var(--purple-main); border: none;
  border-radius: 10px; padding: 10px 20px;
  font-weight: 700; font-size: 0.875rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: background 0.15s; font-family: inherit;
}
.btn-white:hover { background: #f3f0ff; color: var(--purple-main); }

/* ── KARTA GRUPY — PRZYCISK / META (element/groups/card.php, dashboard groups tab) ── */
.card-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 10px; border-radius: 9px; border: none;
  font-weight: 700; font-size: 0.875rem; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s, opacity 0.15s; font-family: inherit;
  margin-top: auto;
}
.card-btn.primary { background: var(--purple-main); color: #fff; }
.card-btn.primary:hover { background: #5a32d4; color: #fff; }
.card-btn.outline { background: transparent; border: 1.5px solid var(--purple-main); color: var(--purple-main); }
.card-btn.outline:hover { background: var(--purple-soft); }
.card-btn.disabled { background: #f3f4f6; color: var(--muted); cursor: not-allowed; pointer-events: none; }

.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.76rem; color: var(--muted); margin-bottom: 12px;
  flex-wrap: nowrap; gap: 8px; white-space: nowrap;
}
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── FILTRY (sidebar listy grup + zakładka "Moje grupy" w dashboardzie) ── */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--border); background: #fff; border-radius: 99px;
  padding: 5px 16px; font-size: 0.82rem; font-weight: 500; cursor: pointer;
  transition: all 0.15s; color: var(--text); user-select: none;
  display: flex; align-items: center; gap: 5px;
}
.chip:hover { border-color: var(--purple-main); color: var(--purple-main); }
.chip.active { background: var(--purple-main); border-color: var(--purple-main); color: #fff; font-weight: 600; }
.chip-count { font-size: 0.72rem; font-weight: 700; }

/* ── TAGI / BADGE'Y ── */
.tag {
  font-size: 0.7rem; font-weight: 700;
  border-radius: 99px; padding: 3px 10px;
  display: inline-flex; align-items: center; gap: 4px;
}
.tag-game    { background: var(--purple-soft); color: var(--purple-main); }
.tag-private { background: #f3f4f6; color: var(--muted); font-size: 0.68rem; }

/* Status koperty grupy — używane na liście grup (element/groups/card.php) */
.tag-status { font-size: 0.7rem; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.tag-status.open   { background: #f0fdf4; color: #16a34a; }
.tag-status.full   { background: #fef2f2; color: #dc2626; }
.tag-status.closed { background: #f3f4f6; color: var(--muted); }

/* ── PROG BAR ── */
.prog-bar-bg { background: #f3f4f6; border-radius: 99px; height: 6px; overflow: hidden; }
.prog-bar    { height: 100%; border-radius: 99px; background: var(--purple-main); transition: width 0.4s ease; }
.prog-bar.full { background: var(--red); }
.prog-bar.high { background: var(--orange); }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover { border-color: var(--purple-main); background: #faf8ff; }
.upload-zone i { font-size: 1.8rem; color: #d1d5db; display: block; margin-bottom: 10px; }
.upload-zone p { font-size: 0.88rem; color: var(--text); font-weight: 500; margin: 0 0 4px; }
.upload-zone span { font-size: 0.76rem; color: var(--muted); }

/* ── TOGGLE SWITCH ── */
.toggle-switch { position: relative; width: 44px; height: 24px; cursor: pointer; display: inline-block; }
.toggle-switch input { display: none; }
.toggle-track {
  width: 44px; height: 24px; background: #d1d5db;
  border-radius: 99px; transition: background 0.2s; cursor: pointer; display: block;
}
.toggle-switch input:checked + .toggle-track { background: var(--purple-main); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff;
  border-radius: 50%; transition: transform 0.2s; pointer-events: none;
}
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* ── FORM FIELDS ── */
.form-label-mlt {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text); margin-bottom: 6px; letter-spacing: 0.02em;
}
.form-control-mlt {
  width: 100%; border: 1.5px solid var(--border); border-radius: 9px;
  padding: 10px 14px; font-size: 0.88rem; color: var(--text);
  outline: none; transition: border-color 0.15s; font-family: inherit; background: #fff;
}
.form-control-mlt:focus { border-color: var(--purple-main); }
.form-control-mlt::placeholder { color: #d1d5db; }
textarea.form-control-mlt { resize: vertical; min-height: 90px; }

/* ── ANIMACJE ── */
@keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
