/* ==========================================================================
   1. ZMIENNE, FUNDAMENTY I RESET
   ========================================================================== */
:root {
    /* Paleta Marki (Forest) */
    --forest-dark: #052e16;
    --forest-mid: #064e3b;
    --forest-light: #10b981;
    --mint-soft: #f0fdf4;

    /* Kolory Stref (Akcenty) */
    --work-blue: #2563eb;
    --work-bg: #eff6ff;
    --qa-purple: #7c3aed;
    --qa-bg: #f5f3ff;
    --market-orange: #ea580c;
    --market-bg: #fff7ed;

    /* Interfejs i Tekst */
    --bg-main: #f0f2f5;
    --white: #ffffff;
    --ink: #0f172a;
    --slate-500: #64748b;
    --danger: #e11d48;

    /* Efekty i Promienie */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 12px 24px -8px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
    --radius-full: 40px;
    --radius-card: 28px;
    --radius-btn: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Reset dla mobile */
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--ink);
    padding-bottom: 110px; /* Miejsce na floating nav */
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}
/* ==========================================================================
   2. HEADER, LOGO I NAWIGACJA STREF (ZONE)
   ========================================================================== */
.app-header {
    background: var(--forest-dark);
    padding: 30px 20px;
    border-radius: 0 0 var(--radius-full) var(--radius-full);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(5, 46, 22, 0.15);
}

.logo {
    font-weight: 900;
    font-size: 24px;
    color: var(--white);
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

#radar-status {
    background: rgba(16, 185, 129, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--forest-light);
    font-size: 10px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.zone-nav {
    display: flex;
    gap: 8px;
    padding: 15px;
    position: sticky;
    top: -1px; /* POPRAWKA: -1px zapobiega "dziurze" przy przyklejaniu do góry */
    z-index: 900;
    backdrop-filter: blur(15px);
    background: rgba(240, 242, 245, 0.8);
}

.zone-nav button {
    flex: 1;
    padding: 12px 5px;
    border-radius: 18px;
    border: none;
    font-size: 11px;
    font-weight: 800;
    background: var(--white);
    color: var(--slate-500);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    outline: none; /* Dodaj, żeby uniknąć niebieskich obwódek w Chrome */
}

.zone-nav button.active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

#btn-zone-work.active { background: var(--work-blue) !important; }
#btn-zone-qa.active { background: var(--qa-purple) !important; }
#btn-zone-market.active { background: var(--market-orange) !important; }

/* ==========================================================================
   3. WYSZUKIWARKA I FILTRY (PIGUŁKI)
   ========================================================================== */
.search-bar {
    background: var(--white);
    padding: 18px;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    /* Zapobiega skokom układu */
    overflow: hidden;
}

#search-input, #location-input {
    background: #f1f5f9;
    /* Dodaj lekkie przejście dla focusa */
    transition: background 0.2s, border-color 0.2s;
}

#category-filters {
    display: flex;
    flex-wrap: nowrap; /* ZMIANA: pigułki w jednej linii */
    gap: 8px;
    padding: 12px 0 5px 0;
    overflow-x: auto; /* ZMIANA: przewijanie na boki */
    scrollbar-width: none; /* Ukrywa pasek przewijania (Firefox) */
    -webkit-overflow-scrolling: touch; /* Płynność na iPhone */
}

#category-filters::-webkit-scrollbar {
    display: none; /* Ukrywa pasek przewijania (Chrome/Safari) */
}

.filter-chip {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: var(--white);
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap; /* Zapobiega łamaniu tekstu w pigułce */
}

.filter-chip:hover {
    background: #f8fafc;
}

.filter-chip.active {
    background: var(--forest-dark) !important;
    color: white !important;
    border-color: var(--forest-dark) !important;
}

/* ==========================================================================
   4. KARTY OGŁOSZEŃ (Ad-Card)
   ========================================================================== */
.ad-card {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius-card);
    margin-bottom: 18px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Zapobiega wychodzeniu tekstu poza kartę */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Subtelny efekt dla komputerów (na mobile i tak działa :active) */
@media (hover: hover) {
    .ad-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: rgba(0,0,0,0.08);
    }
}

.ad-card:active {
    transform: scale(0.97);
    box-shadow: none;
}

/* Nagłówek karty (Autor, Miasto) */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--slate-500);
    margin-bottom: 10px;
}

.card-author {
    font-weight: 800;
    color: var(--forest-mid);
}

/* Tytuł karty */
.ad-card h3 {
    font-size: 18px;
    font-weight: 900;
    margin: 8px 0;
    letter-spacing: -0.5px;
    color: var(--ink);
    line-height: 1.3;
}

/* --- Nowości: Cena i Medale --- */
.price-tag {
    background: var(--market-bg);
    color: var(--market-orange);
    font-weight: 900;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
    margin: 5px 0 10px 0;
}

.reputation-badge {
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Opis karty */
.ad-card p {
    font-size: 13px;
    color: #475569;
    margin-bottom: 15px;
    line-height: 1.5;
    /* Ograniczenie do 4 linii, żeby karty nie były gigantyczne */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stopka karty (Przyciski akcji) */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
/* ==========================================================================
   5. FORMULARZE I INPUTY
   ========================================================================== */
input, textarea, select {
    background: #f1f5f9;
    border: 2px solid transparent;
    padding: 14px 16px;
    border-radius: var(--radius-btn);
    /* 16px zapobiega auto-zoomowi na iPhone przy kliknięciu */
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--ink);
    appearance: none; /* Czyściejszy wygląd selectów na iOS */
}

input:focus, textarea:focus, select:focus {
    border-color: var(--forest-light);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Styl dla placeholderów */
::placeholder {
    color: var(--slate-500);
    opacity: 0.7;
}

textarea {
    resize: none;
    height: 120px;
    line-height: 1.5;
}

/* Usunięcie brzydkich żółtych tło przy autouzupełnianiu */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f1f5f9 inset !important;
}
/* ==========================================================================
   6. PRZYCISKI (Buttons)
   ========================================================================== */
/* Główne działanie (np. Opublikuj, Kontakt) */
.btn-main-action {
    background: var(--forest-dark);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: var(--radius-btn);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-main-action:hover {
    background: var(--forest-mid);
    box-shadow: 0 4px 12px rgba(5, 46, 22, 0.2);
}

.btn-main-action:active {
    transform: scale(0.98);
    opacity: 0.95;
}

/* Stan, gdy przycisk jest zablokowany (np. trwa wysyłanie) */
.btn-main-action:disabled {
    background: var(--slate-500);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* Przycisk wyboru/poboczny (np. Mapa, Zapytaj) */
.btn-select {
    background: var(--mint-soft);
    color: var(--forest-dark);
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-select:hover {
    background: #dcfce7;
}

.btn-select:active {
    transform: scale(0.95);
}

/* ==========================================================================
   7. PROFIL UŻYTKOWNIKA I SEJF CV
   ========================================================================== */
.profile-header-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-card);
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* Stylizacja Sekcji Sejfu CV */
.cv-safe-box {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--radius-btn);
    border: 1px solid #e2e8f0;
    text-align: left; /* Zmiana na lewo dla lepszej czytelności etykiet */
}

.cv-safe-box label {
    font-size: 11px;
    font-weight: 800;
    color: var(--slate-500);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

#user-cv-link {
    border: 2px solid #e2e8f0;
    background: var(--white);
    margin-top: 8px;
    text-align: left;
    /* Poniższe linie zapobiegają rozciąganiu strony przez długi link */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#user-cv-link:focus {
    border-color: var(--work-blue);
    background: var(--white);
}

/* Taby w profilu */
.profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 5px;
    background: #e2e8f0;
    border-radius: 20px;
}

.profile-tabs button {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent; /* Tło bierze z kontenera wyżej */
    border-radius: 15px;
    font-weight: 800;
    font-size: 11px;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tabs button.active {
    background: var(--white); /* Efekt przełącznika (pill) */
    color: var(--forest-dark);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   8. CZAT I WIADOMOŚCI (Modern Dymki)
   ========================================================================== */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Mocniejszy kontrast tła */
    backdrop-filter: blur(8px);
    display: none; /* Sterowane przez JS (flex) */
    align-items: flex-end;
    z-index: 10000;
}

.chat-container {
    width: 100%;
    height: 90vh; /* Większy, żeby było wygodniej pisać */
    background: var(--white);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-header {
    padding: 15px 20px;
    background: var(--white);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    overflow-y: auto;
    background: #f8fafc;
    /* Płynny scroll na iOS */
    -webkit-overflow-scrolling: touch;
}

/* Dymki wiadomości */
.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word; /* Żeby długie słowa nie wystawały */
}

.msg.me {
    align-self: flex-end;
    background: var(--forest-dark);
    color: var(--white);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(5, 46, 22, 0.1);
}

.msg.them {
    align-self: flex-start;
    background: var(--white);
    color: var(--ink);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* Stopka czatu */
.chat-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--white);
    border-top: 1px solid #f1f5f9;
    /* Miejsce na "bezpieczną strefę" w iPhone'ach */
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

#chat-input {
    flex: 1;
    margin-bottom: 0;
    border-radius: 25px; /* Bardziej obły kształt inputu czatu */
}

/* Karta CV w czacie - Stylizacja dla 'them' (biała karta) */
.them .cv-msg-card {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 12px;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
}

.btn-cv-download {
    display: block;
    margin-top: 8px;
    padding: 10px;
    background: var(--forest-dark);
    color: white !important;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-cv-download:active {
    transform: scale(0.96);
}

      /* ==========================================================================
         9. DOLNA NAWIGACJA & FIXY STREF
         ========================================================================== */
      .bottom-nav {
          position: fixed !important;
          bottom: 20px !important;
          left: 15px !important;
          right: 15px !important;
          height: 70px !important;
          background: rgba(255, 255, 255, 0.9) !important;
          backdrop-filter: blur(15px) saturate(180%) !important;
          -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
          display: none; /* JS przełączy na flex po zalogowaniu */
          justify-content: space-around !important;
          align-items: center !important;
          border-radius: 25px !important;
          border: 1px solid rgba(255, 255, 255, 0.3) !important;
          box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
          z-index: 99999 !important;
      }

      .nav-item {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          background: none;
          border: none;
          color: var(--slate-500);
          font-size: 10px;
          font-weight: 700;
          gap: 4px;
          cursor: pointer;
          transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
          position: relative;
      }

      .nav-item.active {
          color: var(--forest-mid) !important;
          transform: translateY(-5px);
      }

      #chat-badge {
          position: absolute;
          top: -5px;
          right: 15%;
          background: var(--danger);
          color: white;
          font-size: 9px;
          padding: 2px 5px;
          border-radius: 10px;
          border: 2px solid white;
          font-weight: 900;
      }

      /* Margines bezpieczeństwa na dole dla feedu */
      #feed-board, .container {
          padding-bottom: 110px !important;
      }

      /* ==========================================================================
         10. LISTA CZATÓW I ANIMACJE
         ========================================================================== */
      .chat-row-item {
          display: flex;
          align-items: center;
          padding: 18px 20px;
          background: var(--white);
          border-bottom: 1px solid #f1f5f9;
          cursor: pointer;
          transition: background 0.2s;
      }

      .chat-row-item.unread {
          background: #f0fdf4 !important;
          border-left: 4px solid var(--forest-light);
      }

      .chat-avatar-circle {
          width: 50px;
          height: 50px;
          background: var(--forest-mid);
          color: var(--white);
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: 800;
          font-size: 18px;
          margin-right: 15px;
          flex-shrink: 0;
      }

      @keyframes slideUp {
          from { transform: translateY(100%); }
          to { transform: translateY(0); }
      }

      @keyframes fadeInScale {
          from { opacity: 0; transform: scale(0.95); }
          to { opacity: 1; transform: scale(1); }
      }

      /* ==========================================================================
         11. STYLIZACJA KART STREF (FINAL)
         ========================================================================== */
      .ad-card.work {
          background: linear-gradient(to right, var(--work-bg), #ffffff) !important;
          border-left: 10px solid var(--work-blue) !important;
          border-radius: 20px 30px 30px 20px !important;
      }

      .ad-card.market {
          background: linear-gradient(to right, var(--market-bg), #ffffff) !important;
          border-left: 10px solid var(--market-orange) !important;
          border-radius: 30px 20px 20px 30px !important;
      }

      .ad-card.qa {
          background: #fdfaff !important;
          border: 1px dashed var(--qa-purple) !important;
          border-left: 10px solid var(--qa-purple) !important;
      }

      .section-title {
          font-size: 20px;
          font-weight: 900;
          padding: 20px 15px 10px;
          color: var(--forest-dark);
          text-transform: uppercase;
          letter-spacing: 0.5px;
      }

      /* ==========================================================================
         12. SYSTEM WIDOKÓW I LOGOWANIE
         ========================================================================== */
      .view {
          width: 100%;
          min-height: 100vh;
          display: none; /* Sterowane przez app-ui.js */
      }

      #view-login {
          background: #f8fafc;
          display: none; /* Zmieni się na flex przez JS */
          justify-content: center;
          align-items: center;
          flex-direction: column;
          padding: 20px;
      }

      .login-card {
          background: white;
          padding: 30px;
          border-radius: 20px;
          box-shadow: 0 10px 25px rgba(0,0,0,0.1);
          width: 100%;
          max-width: 400px;
          z-index: 100;
      }

      /* Ukryj nav na ekranie logowania */
      #view-login:not([style*="display: none"]) ~ .bottom-nav {
          display: none !important;
      }

      /* ==========================================================================
         13. SYSTEM CZATU (POPRAWIONY - SZEROKI WIDOK)
         ========================================================================== */

      #chat-window {
          position: fixed !important;
          top: 0 !important;
          /* Centrowanie na dużych ekranach */
          left: 50% !important;
          transform: translateX(-50%) !important;

          /* Szerokość */
          width: 100% !important;
          max-width: 850px !important; /* Tutaj kontrolujesz szerokość na komputerze */

          height: 100% !important;
          background: white !important; /* Zmieniamy z przezroczystego na białe tło */
          z-index: 999999 !important;

          /* Układ wnętrza */
          display: none; /* JS przełącza na 'flex' */
          flex-direction: column;

          /* Estetyka dla wersji desktop */
          box-shadow: 0 0 40px rgba(0,0,0,0.2);
      }

      /* Responsywność - na małych telefonach 100% szerokości */
      @media (max-width: 850px) {
          #chat-window {
              max-width: 100% !important;
              left: 0 !important;
              transform: none !important;
          }
      }

      .ad-card { position: relative; }
      .like-btn-floating:active { transform: scale(1.4); transition: 0.2s; }


  /* ==========================================================================
     14. SYSTEM WIDOKÓW I LOGOWANIE
     ========================================================================== */

  /* Podstawa dla wszystkich widoków */
  .view {
      width: 100%;
      min-height: 100vh;
      display: none; /* JS przełączy na block lub flex */
  }

  /* Widok logowania - WYMUSZENIE WIDOCZNOŚCI PRZEZ JS */
  #view-login {
      background: #f8fafc;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      padding: 20px;
  }

  /* Karta logowania */
  .login-card {
      background: white;
      padding: 30px;
      border-radius: 20px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.1);
      width: 100%;
      max-width: 400px;
      z-index: 100;
      position: relative;
  }

  /* Automatyczne chowanie nawigacji na ekranie logowania */
  #view-login:not([style*="display: none"]) ~ .bottom-nav {
      display: none !important;
  }

  /* ==========================================================================
     15. PROFIL I CZAT (FINAL FIX)
     ========================================================================== */

  .user-profile-card {
      display: flex;
      align-items: center;
      gap: 20px;
      background: white;
      padding: 25px;
      border-radius: 30px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.05);
      margin-bottom: 30px;
      border: 1px solid #f1f5f9;
  }

  .user-avatar {
      width: 70px;
      height: 70px;
      background: var(--forest-mid);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 30px;
      font-weight: 900;
  }

  .btn-remove-fav {
      margin-top: 10px;
      width: 100%;
      padding: 10px;
      border: 1px solid #fecaca;
      background: #fff1f2;
      color: #e11d48;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      transition: 0.3s;
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }

  .btn-remove-fav:hover {
      background: #e11d48;
      color: white;
  }

  .profile-tabs button.active {
      background-color: #22c55e !important; /* Zielony Looking */
      color: white !important;
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  }

  /* Styl dla kontenera dodawania zdjęcia */
  .upload-zone {
      border: 2px dashed #22c55e;
      border-radius: 15px;
      padding: 20px;
      text-align: center;
      cursor: pointer;
      transition: 0.3s;
      background: #f0fdf4;
      margin-bottom: 20px;
  }

  .upload-zone:hover {
      background: #dcfce7;
      border-color: #166534;
  }

  #preview-container img {
      width: 100px;
      height: 100px;
      object-fit: cover;
      border-radius: 10px;
      margin-top: 10px;
      border: 2px solid #22c55e;
  }

  /* ==========================================================================
     16. JEDNOKOLUMNOWY FEED (SINGLE COLUMN)
     ========================================================================== */

  #feed-board {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      gap: 20px !important;
      padding: 15px !important;
      width: 100% !important;
      max-width: 600px !important; /* Optymalna szerokość dla czytelności */
      margin: 0 auto !important;
  }

  /* Karta ogłoszenia dopasowana do jednej kolumny */
  .ad-card {
      display: flex;
      flex-direction: column;
      width: 100% !important;
      background: white;
      border-radius: var(--radius-card);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      position: relative;
  }

  .post-photo-container img {
      width: 100%;
      height: auto;
      max-height: 300px; /* Większe zdjęcie w jednej kolumnie wygląda lepiej */
      object-fit: cover;
  }

  .section-title, #feed-board h2 {
      width: 100%;
      margin: 20px 0 10px 0 !important;
      text-align: left;
      color: var(--forest-mid);
      font-weight: 800;
  }

  /* ==========================================================================
     17. KOMENTARZE I MODALE
     ========================================================================== */

  .comments-section-wrapper {
      display: none; /* Domyślnie schowane */
      padding: 15px;
      background: #f8fafc;
      border-radius: 0 0 15px 15px;
      border-top: 1px solid #e2e8f0;
      transition: all 0.3s ease;
  }

  .btn-toggle-comments {
      width: 100%;
      padding: 12px;
      background: #f1f5f9;
      border: none;
      color: #64748b;
      font-weight: 700;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border-top: 1px solid #eee;
      transition: background 0.2s;
  }

  .btn-toggle-comments:active {
      transform: scale(0.98);
      background: #e2e8f0;
  }

  /* Styl dla podglądu zdjęć na cały ekran */
  .modal-full-img {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.9);
      z-index: 30000;
      align-items: center;
      justify-content: center;
      flex-direction: column;
  }

  .modal-full-img img {
      max-width: 95%;
      max-height: 85%;
      border-radius: 10px;
      box-shadow: 0 0 20px rgba(0,0,0,0.5);
  }

  /* Animacja Modala */
  #custom-modal {
      backdrop-filter: blur(8px);
  }

  #custom-modal > div {
      animation: modalBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  @keyframes modalBounce {
      from { transform: scale(0.8); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
  }

  @keyframes slideDown {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
  }