/* Nowy dark mode styl inspirowany DarkMemes.pl */

:root {
  --bg-page: #090b10;
  --bg-elev: #12151c;
  --bg-elev-2: #1a1d23;
  --text: #e7eaf0;
  --text-muted: #959ba8;
  --accent: #d7323e;
  --accent-2: #9b1c28;
  --ring: #ed4c5c;
  --chip-bg: #222635;
  --card-bg: #151922;
  --max-width: 1200px;;
  --header-h: 64px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 400px at 10% -10%, #0e131b 0%, transparent 60%),
    radial-gradient(1000px 400px at 110% 0%, #0b0f15 0%, transparent 60%),
    var(--bg-page);
  /* Zapełnij wysokość widoku i użyj flexboxa, aby stopka była zawsze na dole.
     min-height zapewnia, że ciało ma co najmniej wysokość ekranu,
     a flex sprawia, że zawartość (nagłówek + main) zajmuje dostępne miejsce,
     pozostawiając stopkę na dole. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* domyślnie element widoczny wszędzie */
.onlydesktop {
    display: block;
}
/* ale na mobile ukrywamy */
@media (max-width: 768px) {
    .onlydesktop {
        display: none !important;
    }
}

.onlymobile {
    display: none !important;
}
@media (max-width: 768px) {
    .onlymobile {
        display: flex !important;
    }
}


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

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Nagłówek */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  display: block;
  width: 100%;
  height: 30px;
}

/* tylko telefony do 768px szerokości */
@media (max-width: 768px) {
  .brand img {
    display: block;
    width: 100%;
    height: 100%;
  }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  color: #d7d9df;
}

.nav-link.active {
  background: #20242f;
  color: #fff;
}

.nav-link:hover {
  background: #20242f;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: #fff;
}

.btn.ghost:hover {
  background: #20242f;
}

.btn.solid {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn.solid:hover {
  background: color-mix(in srgb, var(--accent) 85%, black);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1b2030;
  color: #fff;
  cursor: pointer;
}

.icon-btn:hover {
  background: #262c3f;
}

.icon-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drawer (kategorie) */
.drawer {
  position: fixed;
  z-index: 999999;
  right: 16px;
  top: var(--header-h);
  width: min(420px, 90vw);
  max-height: calc(100dvh - var(--header-h) - 20px);
  background: var(--bg-elev-2);
  border-radius: 0px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  .drawer {
    top: 150px;
    max-height: calc(100dvh - 145px - 20px);
  }
  .drawer-header {
    height: 50px;
  }
}



.drawer.open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.categories-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
}

.categories-list a {
  background: #212634;
  padding: 10px 12px;
  border-radius: 0px;
  opacity: 0.9;
}

.categories-list a:hover {
  opacity: 1;
  outline: 2px solid #2b3144;
}

/* Layout grid: feed + sidebar */
.container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .container {
    grid-template-columns: minmax(0, 1fr) 320px;
    padding: 0 16px;
  }
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  width: 800px;
}

@media (max-width: 768px) {
  .feed{
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    width: 100%;
  }
}

/* Karty memów: kontener linku z tytułem i opisem */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Sekcja tekstowa w karcie mema */
.card-content {
  padding: 12px 0;
}

/* Tytuł mema w karcie */
.card-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f3f7;
  line-height: 1.3;
}

/* Krótki opis w karcie mema */
.card-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px;
  color: var(--text-muted);
  font-weight: bold;
}

.card-desc.pasta
{
  font-size: 1.3rem;
  background-color: #000000;
  color: orange;
}

/*Karta popularnych*/
.popular_mem {
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  background-color: #151922;
  position: relative;
  color: white;
}

.popular_mem img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
  display: block;
  aspect-ratio: 14 / 6;
}

.popular_mem img:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
}

/* Karty memów */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  width: 100%;
}

/* === Regulamin === */
.rules-container {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}

.rules-container h1,
.rules-container h2,
.rules-container h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}

.rules-container p {
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.5;
  color: var(--text);
}

.rules-container ul {
  margin-top: 0;
  margin-bottom: 16px;
  padding-left: 20px;
  list-style-type: disc;
  color: var(--text);
}
.rules-container li {
  margin-bottom: 8px;
}
.card-media {
  display: flex;
  justify-content: center;
}
.card.tall .card-media img {
  aspect-ratio: 3 / 4;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card.wide .card-media img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-media img {
  /*aspect-ratio: 1 / 1;*/
  max-width: 600px;
  object-fit: cover;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.chip {
  background: var(--chip-bg);
  color: #cfd6e6;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
}

.chip.red {
  background: #3a1f25;
  color: #ffd5da;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.card-actions-admin {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}


.btn.icon-left svg {
  margin-right: 6px;
}

.nonvote {
  background: #20242f;
  color: white;
}

.btn.nonvote:hover {
  outline: 2px solid #2a3144;
}

.upvote {
  background: green !important;
  color: white !important;
}

.btn.upvote:hover {
  outline: 2px solid #2a3144;
}

/* Sidebar */
.sidebar{
  width: 400px;
}
.sidebar .box {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  padding: 12px;
  margin-bottom: 16px;
}

.sidebar h3 {
  margin: 8px 4px 10px;
}

.sidebar .links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.sidebar .links a {
  color: #d7d9df;
  opacity: 0.9;
}

.sidebar .links a:hover {
  opacity: 1;
}

.sidebar .users {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.sidebar .users li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar .users img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

/* Wiadomości (panel slide-over) */
.messages {
  position: fixed;
  inset: var(--header-h) 0 0 auto;
  width: min(980px, 100%);
  max-height: calc(100dvh - var(--header-h));
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg-elev-2);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateX(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
}

.messages.open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

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

.messages-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 0;
}

.thread-list {
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.thread {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #212634;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid transparent;
  text-align: left;
}

.thread:hover {
  border-color: #2c3346;
}

.thread.active {
  outline: 2px solid #2c3346;
}

.thread img {
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.thread .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.thread-view {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}

.bubble-list {
  list-style: none;
  margin: 0;
  padding: 16px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.bubble {
  max-width: 70%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.bubble.theirs {
  background: #212634;
}

.bubble.mine {
  background: #2e354a;
  margin-left: auto;
}

.composer {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.composer input {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 0 12px;
}

.composer .btn {
  height: 42px;
}

/* Ukryj elementy z klasą .hidden */
.hidden {
  display: none !important;
}

/* ===== Panel użytkownika w sidebarze ===== */
/* ======================
   Karta użytkownika
   Stylizowana na wzór DarkMemes – tło, statystyki, akcent czerwieni
====================== */
.user-card {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Cienka czerwona linia u dołu karty */
.user-card::after {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 8px;
}

/* Górna część karty: avatar + informacje */
.user-card-top {
  display: flex;
  gap: 16px;
  align-items: center;
}
.user-avatar {
  /* Większy avatar na wzór DarkMemes – kwadratowa ramka */
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2f38;
}
.user-info h2 {
  margin: 0 0 6px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}
.user-info .stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-info .stats li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-info .stats .icon {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Dolna część karty: linki */
.user-card-bottom {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.85rem;
}
.user-card-bottom a {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  white-space: nowrap;
}
.user-card-bottom a:hover {
  color: var(--accent);
  opacity: 1;
}
.user-card-bottom .icon {
  font-size: 1rem;
}

/* ========================================
   Layout for messages overview page (messages.html)
   Shows a list of all conversations alongside the sidebar.
======================================== */
.messages-container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .messages-container {
    /*
      Na desktopie lista rozmów nie powinna być wąska. Używamy minmax z minimalną
      szerokością 500px, by zapewnić czytelność nawet przy mniejszych rozdzielczościach.
      Druga kolumna zachowuje stałą szerokość 320px na panel boczny.
    */
    grid-template-columns: minmax(750px, 1fr) 320px;
  }
}

/* List of conversations */
.thread-list-page {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.thread-list-page h2 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}
.thread-listing {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.thread-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #212634;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.thread-card:hover {
  border-color: #2c3346;
  background: #262c3f;
}
.thread-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.thread-card .thread-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thread-card .thread-info strong {
  font-size: 0.9rem;
  color: #fff;
}
.thread-card .thread-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.thread-card .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

/* Czas ostatniej wiadomości w liście wątków */
.thread-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Highlight the active messages icon in nav */
.nav-actions .messages-link.active {
  background: #20242f;
  border-color: rgba(255, 255, 255, 0.08);
}
.nav-actions .messages-link.active:hover {
  background: #20242f;
}

/* Highlight active state for notifications toggle */
.nav-actions .notifications-toggle.active {
  background: #20242f;
  border-color: rgba(255, 255, 255, 0.08);
}
.nav-actions .notifications-toggle.active:hover {
  background: #20242f;
}

/* ========================================
   Layout for single conversation page (message.html)
   Contains a conversation view with bubbles and a sidebar.
======================================== */
.message-container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .message-container {
    /*
      Na desktopie wymuszamy minimalną szerokość 500px dla panelu rozmowy,
      aby okno wiadomości nie było zbyt wąskie. Drugi panel pozostaje stały.
    */
    grid-template-columns: minmax(750px, 1fr) 320px;
  }
}

.thread-view-page {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 60vh;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}
.thread-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #20242f;
}
.thread-page-header .back-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.thread-page-header .back-link:hover {
  text-decoration: underline;
}
.thread-page-header .thread-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

/* ========================================
   Drawer for notifications (powiadomienia)
   Appears when clicking the bell icon. Similar to the categories drawer.
======================================== */
#notifications-panel {
  position: fixed;
  right: 16px;
  top: var(--header-h);
  width: min(360px, 90vw);
  max-height: calc(100dvh - var(--header-h) - 20px);
  background: var(--bg-elev-2);
  border-radius: 0px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 50;
}
#notifications-panel.open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.notifications-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  /* limit height so it scrolls if too many items */
  max-height: calc(100dvh - var(--header-h) - 100px);
}
.notifications-list li {
  display: block;
  background: #212634;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #d7d9df;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.notifications-list li:hover {
  background: #262c3f;
  border-color: #2c3346;
}
.notifications-list li a {
  color: inherit;
}

/* Display small time stamps inside message bubbles */
.bubble .time {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* === Formularz odpowiedzi w komentarzach === */
.reply-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reply-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  font-size: 0.85rem;
  resize: vertical;
}
.reply-form .btn {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 0.8rem;
  height: auto;
  margin-bottom: 5px;
}

/* desktop i wyżej */
@media (min-width: 1024px) {
  .rating-count {
  display: inline-block;
  padding: 5px 10px;
  margin: 0 5px;
  background-color: #2a2f32;
  color: #e2e2e2;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 65px;
  }
}

.rating-count {
  display: inline-block;
  padding: 5px 10px;
  margin: 0;
  background-color: #2a2f32;
  color: #e2e2e2;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 65px;
}

.vote-com-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  background: #20242f;
  color: white;
}
/* domyślnie (mobile i tablet) */
.vote-com-btn.left {
  margin-left: 24%;
}

/* desktop i wyżej */
@media (min-width: 1024px) {
  .vote-com-btn.left {
    margin-left: 68%;
  }
}

.pos {
  color: green;
  font-weight: bold;
}

.neg {
  color: red;
  font-weight: bold;
}

.pspoiler {
  color: black;
  background: black;
}

.vote-subcom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  background: #20242f;
  color: white;
}
/* domyślnie (mobile i tablet) */
.vote-subcom-btn.left {
  margin-left: 13%;
}

/* desktop i wyżej */
@media (min-width: 1024px) {
  .vote-subcom-btn.left {
    margin-left: 65%;
  }
}

/* wszystko ponizej 360px */
@media (max-width: 360px) {
  .vote-subcom-btn.left {
    margin-left: 10%;
  }
  .rating-count {
    width: 60px;
  }
  .btn {
    padding: 4px;
  }
  .vote-com-btn.left {
    margin-left: 23%;
  }
  .vote-btn {
    padding: 14px;
  }
  .vote-com-btn
  {
    padding: 12px;
  }
  .vote-subcom-btn
  {
    padding: 12px;
  }
}

/* Override bubble and composer styles inside conversation page for spacing */
.thread-view-page .bubble-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.thread-view-page .bubble {
  max-width: 75%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}
.thread-view-page .bubble.theirs {
  background: #212634;
}
.thread-view-page .bubble.mine {
  background: #2e354a;
  margin-left: auto;
}
.thread-view-page .composer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #20242f;
}
.thread-view-page .composer input {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 0 12px;
}
.thread-view-page .composer .btn {
  height: 40px;
}

/* Responsive adjustments for messages pages */
@media (max-width: 640px) {
  .thread-page-header {
    flex-wrap: wrap;
  }
  .thread-page-header .thread-title {
    flex: 1 1 100%;
    margin-top: 6px;
  }
}

/* ===== Modale logowania i rejestracji ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 20px;
}
.modal.hidden {
  display: none;
}
.modal-dialog {
  margin-top: 80px;
  background: var(--bg-elev-2);
  border-radius: 0px;
  box-shadow: var(--shadow);
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}
.auth-form input {
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 0 12px;
}
.auth-footer {
  padding: 14px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* ========================================
   Paginacja na dole feedu
   Pokazuje listę numerów stron i przyciski nawigacyjne.
   Komponent zajmuje całą szerokość siatki (rozciąga się na obie kolumny),
   a poszczególne przyciski mają subtelny cień i zaokrąglone rogi.
======================================== */
.pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  border-radius: 8px;
  background: #20242f;
  color: #d7d9df;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pagination a:hover {
  background: #2e354a;
  border-color: rgba(255, 255, 255, 0.1);
}
.pagination a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Ustawiamy main jako elastyczny element w układzie flex na body,
   dzięki czemu wypełnia on przestrzeń pomiędzy nagłówkiem a stopką. */
main {
  flex-grow: 1;
}

/* ========================================
   Układ strony pojedynczego mema (meme.html)
   Dwukolumnowy grid: mem + komentarze / sidebar
======================================== */
.meme-container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .meme-container {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* Karta mema na stronie pojedynczego mema */
.meme {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.meme-media img {
  width: 100%;
  border-radius: 12px;
}
.meme-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5f7fb;
}
.meme-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.meme-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

/* Sekcja komentarzy */
.comments {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comments h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment {
  display: flex;
  gap: 12px;
}
.comment-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}
.subcomment-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
/* desktop i wyżej */
@media (min-width: 1024px) {
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.subcomment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
} 
}
.comment-body {
  flex: 1;
}
.comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.comment-header strong {
  font-size: 0.9rem;
  color: #fff;
}
.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comment-text {
  margin: 4px 0;
  font-size: 0.9rem;
  line-height: 1.4;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.comment-text.expanded {
  max-height: 1000px;
}
.toggle-btn {
  margin-top: 5px;
  display: inline-block;
}
.reply-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}
.reply-btn:hover {
  text-decoration: underline;
}
.replies {
  list-style: none;
  padding-left: 5px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
  border-left: 3px solid red;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 8px 12px;
  resize: vertical;
}
.comment-form select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 8px 12px;
  resize: vertical;
}
.comment-form .btn {
  align-self: flex-start;
}

/* ========================================
   Profil użytkownika (profile.html)
======================================== */
.profile-container {
  max-width: var(--max-width);
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .profile-container {
    grid-template-columns: minmax(750px, 1fr) 320px;
    padding: 0 16px;
    margin: 24px auto;
    width: 100%;
  }
}
.profile-main {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-info {
  flex: 1;
}
.profile-actions {
  margin-top: 8px;
  justify-content: space-evenly
}
.user-meme-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.user-meme {
  background: #212634;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.user-meme img {
  width: 100%;
  height: auto;
  display: block;
}
.user-meme-title {
  margin: 8px 12px 12px;
  font-size: 0.95rem;
  color: #fff;
}
.user-comments .comment-list {
  gap: 16px;
}
.user-comments .comment-header strong {
  color: #fff;
}
.user-comments a {
  font-size: 0.8rem;
  color: var(--accent);
}
.user-comments a:hover {
  text-decoration: underline;
}

/* ========================================
   Ustawienia konta (settings.html)
======================================== */
.settings-container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.settings-container h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
}
.settings-section {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-section h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 4px;
}
.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"] {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 0 12px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ========================================
   Panel administracyjny (admin.html)
======================================== */
.admin-container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.admin-container h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
}
.admin-section {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-section h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.admin-search input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  padding: 0 12px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}
.admin-table th {
  background: #20242f;
  font-weight: 600;
}
.admin-table tbody tr:nth-child(even) {
  background: #171b25;
}
.admin-table tbody tr:hover {
  background: #222735;
}
.admin-table button {
  font-size: 0.8rem;
  padding: 4px 8px;
  height: auto;
}

/* ========================================
   Stopka strony
   Prosty pasek na dole z informacjami o prawach autorskich, kontakcie i regulaminie.
   Ustawiono stonowane kolory, aby nie odciągać uwagi od treści, a linki podświetlają się po najechaniu.
======================================== */
.site-footer {
  margin-top: 40px;
  padding: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #8d92a3;
  background: var(--bg-elev);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 8px;
}
.site-footer a:hover {
  text-decoration: underline;
}
/* Fokus accessibility */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ring) 70%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* -------------------------
   Responsywność dla małych ekranów
   Przy szerokości ≤ 640px nawigacja zmienia układ
-------------------------- */
@media (max-width: 640px) {
  /* Kompaktowy nagłówek mobilny: marka i akcje w jednym wierszu, nawigacja w następnym.
     Zamiast wymuszać sztywne szerokości (45%), pozwalamy elementom zajmować
     potrzebną przestrzeń i grupujemy je logicznie. */
  .site-header .wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    height: auto;
    padding: 8px 16px;
  }
  /* Główna nawigacja: linki (Strona główna, Poczekalnia, Kategorie) */
  .main-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
  }
  .main-nav .nav-link {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  /* Akcje (ikony, logowanie, rejestracja) tworzą drugi wiersz */
  .nav-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
    margin-top: 5px;
  }
  .nav-actions .icon-btn,
  .nav-actions .btn {
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    height: 36px;
  }
  /* Niższe przyciski dla logowania/rejestracji na mobile */
  .btn {
    height: 36px;
    font-size: 0.85rem;
  }
  /* Ciasne odległości między elementami zapewniają prostotę */
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

#notifications-panel .notification {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: #252425;
}

#notifications-panel .notif-avatar-right {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px; /* odstęp od tekstu */
  flex-shrink: 0; /* nie pozwól się ściskać */
}

#notifications-panel .notif-content {
  flex: 1; /* treść zajmuje resztę miejsca */
  color: #fff;
  min-width: 0; /* pozwala na zawijanie tekstu */
}

#notifications-panel .notif-text {
  display: block;
}

#notifications-panel .notif-date {
  font-size: 12px;
  color: #9aa0a6;
}

#notifications-panel .notif-actions {
  display: flex;
  gap: 8px;
  margin-left: 12px; /* odstęp od treści */
}

#notifications-panel .notif-actions button {
  background: none;
  border: none;
  color: #9aa0a6;
  cursor: pointer;
}

#notifications-panel .notif-actions button:hover {
  color: #fff;
}

/* Nieprzeczytane */
#notifications-panel .notification.unread {
  background: #2f2f30;        /* ciut jaśniejsze tło */
  border-left: 4px solid red; /* pasek akcentowy (bootstrap primary) */
}

/* Przeczytane */
#notifications-panel .notification.read {
  background: #252425;        /* normalne tło */
  opacity: 0.8;               /* delikatnie przygaszone */
}


/* Kontener na przyciski */
#notifications-panel .notif-actions {
  grid-column: 3;
  display: flex;
  gap: 6px;
}

/* Styl dla przycisków */
#notifications-panel .notif-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #2f2f30;
  border: 1px solid #3d3d3f;
  color: #9aa0a6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Ikona w środku */
#notifications-panel .notif-btn i {
  font-size: 20px;
  pointer-events: none;
}

/* Hover efekt */
#notifications-panel .notif-btn:hover {
  background: #3f3f41;
  color: #fff;
  border-color: #555;
}

/* Active kliknięcie */
#notifications-panel .notif-btn:active {
  background: #0d6efd;
  border-color: #0a58ca;
  color: #fff;
}

/* Stan modali */
.modal-success { border-left: 3px solid #22c55e; } /* zielony */
.modal-error   { border-left: 3px solid var(--accent); } /* czerwony */

/* Opcjonalna delikatna animacja */
.modal .modal-dialog {
  animation: dm-modal-in 200ms ease-out;
}
@keyframes dm-modal-in {
  from { transform: translateY(-8px) scale(0.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Uniwersalna tabela */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table th {
  background-color: var(--bg-elev-2);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.table tr:last-child td {
  border-bottom: none;
}

/* Warianty dla specyficznych tabel */
.table.user-activity td.username {
  word-break: break-word;
  max-width: 200px;
  font-weight: 500;
}

.table.user-activity td.last-active {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 14px;
}

/* Paginacja: duży Next + rząd chipów */
.pagination {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* duży przycisk "Następna" */
.pagination .next-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: background 0.2s ease, transform 0.06s ease;
  text-decoration: none;
}
.pagination .next-btn:hover {
  background: color-mix(in srgb, var(--accent) 85%, black);
}
.pagination .next-btn:active {
  transform: translateY(1px);
}
.pagination .next-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* rząd małych "chipów" stron */
.pagination .page-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* korzystamy z Twojej .chip, ale delikatnie dostosowujemy */
.pagination .page-chips .chip {
  background: var(--chip-bg);
  color: #cfd6e6;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pagination .page-chips .chip:hover {
  background: #262c3f;
  border-color: #2c3346;
  color: #fff;
}
.pagination .page-chips .chip.active,
.pagination .page-chips .chip[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.page-chips .chip.wide {
  min-width: 100px;
  text-align: center;
}

/* domyślnie np. na desktop */
input, textarea {
  font-size: 14px;
}

/* tylko na mobile – zapobiega auto-zoom na iOS */
@media (max-width: 767px) {
  input, textarea {
    font-size: 16px;
  }
}

.img-wrapper { position: relative; overflow: hidden; }
.img-wrapper.expanded { max-height: none; }
.img-wrapper a { display: block; position: relative; z-index: 1; }
.mem-img { display: block; max-width: 100%; height: auto; }

.img-toggle {
  position: absolute; bottom: 0; left: 0; width: 100%;
  text-align: center; background: rgba(0,0,0,0.6);
  color: #fff; padding: 6px; font-size: 14px; cursor: pointer;
  user-select: none; z-index: 2;
}

/* zajebane z bootstrapa */

.form-inline {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.5rem; /* odstępy między elementami */
}

.form-inline label {
  margin: 0 0.5rem 0 0;
}

.form-inline input,
.form-inline select,
.form-inline button {
  margin: 0 0.25rem;
  width: auto;
}

.tabs {
  border-radius: 0px;
  min-height: 60px;
  height: 20%;
  width: 30%;
  background-color: #303030;
  padding: 0;
  border: 0;
}

/* =====================================================================
   Rozbudowany i nowoczesny wygląd formularzy dodawania treści

   W serwisie nastąpiła rozbudowa strony dodawania memów. Formularze
   zostały przebudowane tak, aby lepiej wpisywały się w istniejący
   ciemny motyw. Poniższe klasy definiują układ i wygląd kart
   formularzy, pól tekstowych, selektorów, przycisków i zakładek.

   Wszystkie kolory i promienie oparte są o zmienne z :root, aby
   zachować spójność z resztą serwisu. Tam gdzie dotychczasowe klasy
   nie występowały w motywie, zostały one utworzone od podstaw.
===================================================================== */

/* Główny kontener strony dodawania – ustawia maksymalną szerokość
   oraz pionowy układ sekcji formularzy. */
.add-meme-wrapper {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.tabs-div {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.tab-btn {
  flex: 1;
  text-align: center;
}

/* Na wąskich ekranach – guziki pod sobą */
@media (max-width: 640px) {
  .tabs-div {
    flex-direction: column;
    align-items: stretch;
    margin-left: 5px;
    margin-right: 5px;
  }
  .tab-btn {
    width: 100%;
  }
}

/* Pojedynczy przycisk zakładki. Korzysta z kolorystyki motywu
   i zachowuje się jak przycisk (cursor: pointer). */
.tabs-div .tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: #212634;
  color: var(--text-muted);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Aktywna zakładka – wyróżniona kolorem akcentu */
.tabs-div .tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* Hover dla zakładek – delikatne rozjaśnienie tła */
.tabs-div .tab-btn:hover {
  background: #2a2f3f;
}

/* Kontener pojedynczego formularza. Ma lekko podniesione tło,
   obramowanie i cień analogiczny do kart memów w feedzie. */
.add-form-container {
  background: var(--bg-elev-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Nagłówek formularza – wyrównany do lewej, wyraźny tytuł sekcji */
.add-form-container .form-header {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

/* Sekcje formularza – pionowy układ label oraz input/textarea */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Etykieta formularza */
.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Pola tekstowe (input, textarea) */
.form-input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  font-size: 1rem;
}

/* Umożliwia korzystanie z dłuższych pól tekstowych bez narzucania wysokości */
.form-section textarea.form-input {
  height: auto;
  resize: vertical;
  padding: 8px 12px;
}

/* Styl ciemnego selecta – spójny z inputami */
.custom-select-dark {
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a25;
  color: var(--text);
  font-size: 1rem;
}
.custom-select-dark option {
  background: var(--bg-elev);
  color: var(--text);
}

/* Checkbox wraz z etykietą w jednej linii */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pola typu checkbox – kwadratowe z niewielkim promieniem */
.form-check-input {
  width: 18px;
  height: 18px;
  background: #151a25;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.form-check-input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

/* Etykieta przy checkboxie */
.form-check-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Główny przycisk formularza – wyrównany do prawej */
.form-button {
  align-self: flex-end;
  height: 44px;
  padding: 0 20px;
  background: var(--accent);
  margin-top: 10px;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.form-button:hover {
  background: color-mix(in srgb, var(--accent) 85%, black);
}

.form-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.container,
.feed { width: 100%; }
.feed { min-width: 0; }


.tabs-div{
  display: flex;
  gap: 10px;
  justify-content: center;
}

.tabs,
.tab-btn{
  display: block;
  text-align: center;
  flex: 1 1 0;
  width: auto;
}

@media (max-width: 768px){
  .tabs-div{
    flex-direction: column;
    align-items: stretch;
  }
  .tabs,
  .tab-btn{
    width: 100%;
  }
}

.col-md-8{
  flex: 0 0 100%;
  max-width: 100%;
}

.content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
  align-items:start;
}


/* ===== Mobile fix dla layoutu ustawień ===== */

@media (max-width: 1024px) {
  main.wrap.content-grid {
    grid-template-columns: 1fr !important;
  }

  .onlydesktop,
  aside.sidebar.onlydesktop {
    display: none !important;
  }
}

.tabs-div {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}
.tabs-div .tab-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.add-content-form,
.settings-form {
  display: grid;
  gap: 12px;
}

.form-section { 
  min-width: 0; 
}

.form-label {
  display: block;
  margin-bottom: 6px;
  white-space: normal;  
  overflow-wrap: anywhere;     
}

.form-input,
.custom-select-dark {
  width: 100%;
  min-width: 0;
}

.settings-page__checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 8px;
}
@media (max-width: 1024px) {
  .settings-page__checks {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}
@media (max-width: 640px) {
  .settings-page__checks {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .add-form-container { padding: 12px; }
}
