:root {
    --background: hsl(222.2 84% 4.9%);
    --foreground: hsl(210 40% 98%);
    --card: hsl(222.2 84% 4.9%);
    --card-foreground: hsl(210 40% 98%);
    --popover: hsl(222.2 84% 4.9%);
    --popover-foreground: hsl(210 40% 98%);
    --primary: hsl(210 40% 98%);
    --primary-foreground: hsl(222.2 47.4% 11.2%);
    --secondary: hsl(217.2 32.6% 17.5%);
    --secondary-foreground: hsl(210 40% 98%);
    --muted: hsl(217.2 32.6% 17.5%);
    --muted-foreground: hsl(215 20.2% 65.1%);
    --accent: hsl(217.2 32.6% 17.5%);
    --accent-foreground: hsl(210 40% 98%);
    --destructive: hsl(0 62.8% 30.6%);
    --destructive-foreground: hsl(210 40% 98%);
    --border: hsl(217.2 32.6% 17.5%);
    --input: hsl(217.2 32.6% 17.5%);
    --ring: hsl(212.7 26.8% 83.9%);
    --radius: 0.5rem;
}

body {
    font-family: 'Inter', sans-serif;
    /* Ustawienie tła z obrazem i ciemną nakładką */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/img/moon_forest.png');
    background-color: var(--background); /* Kolor awaryjny, gdyby obraz się nie załadował */
    background-size: cover; /* Pokrycie całego ekranu */
    background-position: center; /* Wyśrodkowanie obrazu */
    background-attachment: fixed; /* Tło stałe podczas przewijania */

    color: var(--foreground);
    margin: 0;
    padding: 2rem; /* Dodajemy padding do body dla lepszych odstępów na krawędziach */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header, main, footer {
    background-color: transparent;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    max-width: 1024px; /* Ograniczenie szerokości */
    margin-left: auto; /* Centrowanie */
    margin-right: auto; /* Centrowanie */
}

h1, h2, h3 {
    color: var(--foreground);
}

header p {
    color: var(--foreground);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); /* Cień dla lepszej czytelności */
}

nav button, .expertBtn, #chatSendBtn, #paymentOptions button, .modal button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
}

nav button:hover, .expertBtn:hover, #chatSendBtn:hover, #paymentOptions button:hover, .modal button:hover {
    background-color: #0056b3;
}

/* Nowoczesny styl pola do wpisywania snu */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-content {
    text-align: center;
}

textarea#dreamInput {
    background-color: rgba(23, 28, 40, 0.5); /* Półprzezroczyste tło */
    backdrop-filter: blur(10px); /* Efekt rozmycia tła pod spodem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--foreground);
    min-height: 120px;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

textarea#dreamInput::placeholder {
    color: var(--muted-foreground);
}

textarea#dreamInput:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--secondary);
}

/* Nowoczesny styl przycisków ekspertów */
#expertButtons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 równe kolumny */
    gap: 1rem; /* Odstęp między przyciskami */
    margin-top: 1rem;
}

.expertBtn {
    position: relative;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.expertBtn[data-expert="Jung"] {
    background-image: linear-gradient(to right, rgba(167, 139, 250, 0.1), rgba(124, 58, 237, 0.15));
    border-color: rgba(167, 139, 250, 0.4);
}
.expertBtn[data-expert="Jung"]:hover {
    background-color: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.8);
}

.expertBtn[data-expert="Freud"] {
    background-image: linear-gradient(to right, rgba(96, 165, 250, 0.1), rgba(59, 130, 246, 0.15));
    border-color: rgba(96, 165, 250, 0.4);
}
.expertBtn[data-expert="Freud"]:hover {
    background-color: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.8);
}

.expertBtn[data-expert="Perls"] {
    background-image: linear-gradient(to right, rgba(52, 211, 153, 0.1), rgba(16, 185, 129, 0.15));
    border-color: rgba(52, 211, 153, 0.4);
}
.expertBtn[data-expert="Perls"]:hover {
    background-color: rgba(52, 211, 153, 0.2);
    border-color: rgba(52, 211, 153, 0.8);
}

#chatOutput {
    background-color: rgba(23, 28, 40, 0.5); /* Półprzezroczyste tło */
    backdrop-filter: blur(10px); /* Efekt rozmycia tła pod spodem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.userMessage, .aiMessage {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    max-width: 80%; /* Wiadomości nie będą na całą szerokość */
    line-height: 1.5;
}

.userMessage {
    background-image: linear-gradient(to right, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05)); /* Bardzo subtelny gradient */
    border: 1px solid rgba(37, 99, 235, 0.5); /* Niebieska ramka/poświata */
    color: var(--foreground); /* Używamy głównego koloru tekstu */
    align-self: flex-end;
    border-bottom-right-radius: 0;
    /* Wspólne style z .aiMessage, które powtarzamy dla pewności */
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    max-width: 80%;
    line-height: 1.5;
}

.aiMessage {
    background-color: var(--muted); /* Kolor z naszej palety dla AI */
    color: var(--foreground);
    align-self: flex-start; /* Wyrównanie do lewej */
    border-bottom-left-radius: 0; /* Efekt "ogonka" dymku */
}

#chatInput {
    background-color: rgba(23, 28, 40, 0.5); /* Półprzezroczyste tło */
    backdrop-filter: blur(10px); /* Efekt rozmycia tła pod spodem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--foreground);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    resize: none; /* Wyłączamy możliwość ręcznej zmiany rozmiaru */
}

#chatInput:focus {
    outline: none;
    border-color: var(--ring); /* Zachowujemy podświetlenie ramki */
}

#chatSendBtn {
    background-color: #16a34a; /* Wyraźny zielony dla akcji */
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    width: 100%; /* Przycisk na całą szerokość */
    margin-top: 0.75rem;
    transition: background-color 0.2s ease-in-out;
}

#chatSendBtn:hover {
    background-color: #15803d; /* Ciemniejszy zielony po najechaniu */
}

/* --- Style dla Okienek Modalnych --- */

/* Główny kontener modala - teraz jako pełnoekranowa nakładka */
.modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex; /* Domyślnie zmieniane z 'none' na 'flex' przez JS */
    justify-content: center;
    align-items: center;
    /* Ta nakładka może mieć własne tło, np. rgba(0,0,0,0.5) dla przyciemnienia, ale trzymamy się planu */
}

/* Nowy styl dla widocznej treści modala */
.modal-content {
    background-color: rgba(23, 28, 40, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: var(--radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    max-height: 90vh; /* Nigdy nie wyższy niż 90% wysokości ekranu */
    overflow-y: auto; /* Włącz przewijanie, jeśli treść się nie mieści */
}

.modal h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

/* Przyciski Social Media */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--secondary);
    color: var(--foreground);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}
.social-btn:hover {
    background-color: var(--accent);
}

.icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.social-btn.google {
    background-color: #ffffff;
    color: #1f2937;
    border-color: #d1d5db;
}
.social-btn.google:hover {
    background-color: #f9fafb;
}

.social-btn.facebook {
    background-color: #1877F2;
    color: #ffffff;
    border: none;
}
.social-btn.facebook:hover {
    background-color: #166fe5;
}

.social-btn.apple {
    background-color: #000000; /* Czarne tło */
    color: #ffffff;           /* Biały tekst */
    border: 1px solid #ffffff; /* Biała obwódka */
}
.social-btn.apple:hover {
    background-color: #222222; /* Lekko jaśniejsze tło po najechaniu */
}

/* Separator "lub" */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted-foreground);
    margin: 0.6rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.separator::before, .separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.separator:not(:empty)::before {
    margin-right: .5em;
}
.separator:not(:empty)::after {
    margin-left: .5em;
}

/* Pola input i etykiety */
.modal label {
    display: block;
    text-align: left;
    margin-bottom: 0.2rem;
    font-weight: 500;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}
.modal input[type="email"],
.modal input[type="password"] {
    background-color: var(--secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--foreground);
    border-radius: var(--radius);
    padding: 0.45rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}
.modal input:focus {
    outline: none;
    border-color: var(--ring);
}

/* Kontener checkboxa */
.terms-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.terms-container label {
    margin-bottom: 0; /* Reset marginesu dla tej etykiety */
}

/* Przyciski akcji */
.modal .btn-primary {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius);
    background-color: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.75rem;
}
.modal .btn-primary:hover {
    background-color: #1d4ed8;
}

.modal .btn-link {
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    text-decoration: underline;
    transition: color 0.2s;
}
.modal .btn-link:hover {
    color: var(--muted-foreground);
}

.modal .modal-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.modal .switch-modal-text {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.modal .closeModalBtn {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--muted-foreground);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}
.modal .closeModalBtn:hover {
    background-color: var(--accent);
    color: var(--foreground);
}

/* Ukrywanie elementów */
.hidden {
    display: none !important;
}

/* Style dla tooltipów ekspertów */
.expert-tooltip {
    display: none; /* Domyślnie ukryty */
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background-color: var(--secondary);
    color: var(--foreground);
    padding: 10px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: normal; /* Tooltipy nie powinny dziedziczyć pogrubienia z przycisku */
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    pointer-events: none;
    width: max-content;
    text-align: center;
}

.expert-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--secondary) transparent transparent transparent;
}

/* Magia CSS: Pokaż tooltip przy najechaniu na rodzica (.expertBtn) */
.expert-tooltip.tooltip-visible {
    display: block;
}

/* Style dla ikony informacyjnej */
.info-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--foreground);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

.info-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Meteor Animation */
.meteors {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: -1; /* Umieszcza meteory pod treścią */
}

.meteor {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(45deg, #fff, transparent);
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.1);
  animation: meteor-horizontal 5s linear infinite;
}

.meteor::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
}

.meteor-1 { top: 10%; left: 30%; animation-delay: 0s; animation-duration: 5s; }
.meteor-2 { top: 25%; left: 80%; animation-delay: 1.5s; animation-duration: 4.5s; }
.meteor-3 { top: 40%; left: 50%; animation-delay: 3s; animation-duration: 6s; }
.meteor-4 { top: 5%; left: 10%; animation-delay: 0.8s; animation-duration: 5.2s; }
.meteor-5 { top: 50%; left: 90%; animation-delay: 2.2s; animation-duration: 5.8s; }

@keyframes meteor-horizontal {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-100vw) translateY(0);
    opacity: 0;
  }
}

nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav button {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}
nav button:hover {
    background-color: var(--accent);
    border-color: var(--primary);
}

main section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
}

#paymentOptions button {
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-top: 0.75rem;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
}

#buySingleBtn {
    background-image: linear-gradient(to right, #f97316, #ef4444); /* Orange to Red */
}
#buySingleBtn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

#subscribeBtn {
    background-image: linear-gradient(to right, #a855f7, #ec4899); /* Purple to Pink */
}
#subscribeBtn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

#paymentOptions h3, #paymentOptions h4 {
    color: var(--foreground);
}
#paymentOptions p {
    color: var(--muted-foreground);
}

/* Kontener siatki dla opcji płatności */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dwie równe kolumny na desktopie */
    gap: 2rem; /* Odstęp między kartami */
}

/* Styl pojedynczej karty płatności */
.payment-grid > div {
    display: flex;
    flex-direction: column; /* Układamy treść w kolumnie */
    background-color: rgba(23, 28, 40, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}

/* Upewniamy się, że przycisk jest zawsze na dole karty */
.payment-grid > div > button {
    margin-top: auto;
}

/* Styl dla linku "Zapomniałem hasła" */
#forgotPasswordBtn {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.5rem;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 0.3rem;
}
#forgotPasswordBtn:hover {
    color: var(--foreground);
    text-decoration: underline;
}

/* Specjalny styl dla przycisku "Zarejestruj się" w modalu logowania */
#loginModalRegisterBtn {
    background-color: #2563eb; /* ZMIANA: Niebieskie tło widoczne od razu */
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.8rem;
    width: 100%;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-top: 1rem; /* Dodajemy odstęp dla lepszego wyglądu */
}
#loginModalRegisterBtn:hover {
    background-color: transparent; /* ZMIANA: Tło znika po najechaniu */
    color: var(--foreground);
    outline: 1px solid var(--border); /* Dodajemy ramkę dla widoczności */
}

.highlight-number {
    color: #eefd47; /* jasny żółty */
    font-size: 1,9rem;
    font-weight: bold;
    vertical-align: middle;
}

#startNewCycleBtn {
    background-color: #16a34a;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-top: 0.75rem;
    transition: background-color 0.2s ease-in-out;
}
#startNewCycleBtn:hover {
    background-color: #15803d;
}

/* --- Styl przełącznika języka --- */
.language-selector-placeholder {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

/* --- Nowe styles dla Custom Language Switcher --- */
.language-switcher-container {
    position: relative;
    display: inline-block;
}

.language-switcher-button {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 10px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher-button:hover, .language-switcher-button:focus {
    background-color: var(--accent);
    border-color: var(--primary);
}

.language-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.language-switcher-arrow {
    margin-left: auto;
    transition: transform 0.2s ease-in-out;
}

.language-switcher-container.open .language-switcher-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 1001; /* Wyżej niż inne elementy */
    margin-top: 4px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.language-option:hover {
    background-color: var(--accent);
}

.language-option .language-flag {
    width: 20px; /* Rozmiar flagi w opcjach */
}

/* --- Responsive Styles & Hamburger Menu --- */

.hamburger-btn {
    display: none; /* Ukryty domyślnie na desktopie */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1010; /* Musi być nad innymi elementami, zawsze na wierzchu */
    position: relative; /* Potrzebne do absolutnego pozycjonowania kresek wewnątrz */
    width: 45px; /* Ustawiamy stały rozmiar dla precyzji animacji */
    height: 45px;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--foreground);
    transition: all 0.3s ease-in-out;
    position: absolute; /* Kluczowe dla transformacji w miejscu */
    left: 10px; /* Wyśrodkowanie kresek w przycisku */
}

/* Pozycjonowanie kresek w stanie spoczynku (hamburger) */
.hamburger-icon:nth-child(1) { top: 10px; }
.hamburger-icon:nth-child(2) { top: 18px; }
.hamburger-icon:nth-child(3) { top: 26px; }

/* Transformacja do "X" gdy menu jest aktywne */
.hamburger-btn.is-active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-icon:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: rgba(23, 28, 40, 0.5); /* Półprzezroczyste tło, jak w textarea */
    backdrop-filter: blur(10px); /* Efekt rozmycia tła */
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Delikatna ramka pasująca do stylu */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Niżej niż przycisk hamburgera */
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

#mobileNavLinks {
    margin-top: 4rem; /* Zwiększamy margines, aby odsunąć przyciski od góry */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#mobileNavLinks > * {
    width: 100%;
    text-align: center;
}

#mobileNavLinks button {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 15px 20px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
    width: 100%; /* Upewnijmy się, że przycisk zajmuje całą dostępną szerokość */
}

#mobileNavLinks button:hover {
    background-color: var(--accent);
    border-color: var(--primary);
}

/* --- Style dla zalogowanego użytkownika w menu mobilnym --- */
#mobileNavLinks #userInfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#mobileNavLinks #userEmailDisplay {
    display: block; /* Kluczowa zmiana, aby margines zadziałał poprawnie */
    margin-bottom: 2rem; /* Większy odstęp pod adresem email */
    color: var(--muted-foreground);
    padding: 10px;
    word-break: break-all;
}

#mobileNavLinks #userInfo button {
    margin-bottom: 1rem; /* Spójny odstęp, taki jak dla przycisków logowania/rejestracji */
}

#mobileNavLinks #userInfo button:last-child {
    margin-bottom: 0; /* Usunięcie marginesu dla ostatniego przycisku */
}

@media (max-width: 768px) {
    header nav {
        display: none;
    }

    .hamburger-btn {
        display: block; /* Pokazujemy przycisk na mniejszych ekranach */
    }

    #expertButtons, .payment-grid {
        grid-template-columns: 1fr; /* Ustawiamy jedną kolumnę na mobilnych */
    }

    main section {
        padding: 1.5rem 1rem; /* Zmniejszamy padding na mobilnych */
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem; /* Zmniejszamy czcionkę nagłówka */
    }

    header p {
        font-size: 1rem; /* Zmniejszamy czcionkę podtytułu */
    }

    /* Mobilne style dla tooltipów - przyklejone do dołu ekranu */
    .expert-tooltip {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        margin-bottom: 0;
        max-width: 100%;
        width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
        transition: transform 0.3s ease-in-out;
        pointer-events: none;
        z-index: 1001;
    }

    .expert-tooltip.tooltip-visible {
        transform: translateY(0);
    }

    .expert-tooltip::after {
        display: none;
    }
}
/* --- Style dla Banera Cookie --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 20, 0.9); /* Ciemne, lekko przezroczyste tło */
    backdrop-filter: blur(5px); /* Efekt rozmycia tła pod spodem */
    color: var(--foreground);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001; /* Wyżej niż menu, ale niżej niż modale */
    gap: 1rem; /* Odstęp między tekstem a przyciskiem */
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

#cookie-banner a {
    color: #a855f7; /* Fioletowy, pasujący do przycisku subskrypcji */
    text-decoration: underline;
}

#cookie-banner button {
    background-color: #16a34a; /* Zielony, jak przycisk "Kontynuuj" */
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap; /* Zapobiega łamaniu tekstu w przycisku */
    transition: background-color 0.2s;
}

#cookie-banner button:hover {
    background-color: #15803d;
}

/* Media query dla mniejszych ekranów */
@media (max-width: 768px) {
    #cookie-banner {
        flex-direction: column; /* Układ pionowy na mobilnych */
        text-align: center;
        padding: 1rem;
    }
}

/* --- Style dla funkcji kopiowania rozmowy --- */
.cycle-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.copy-chat-btn {
    background-color: #2563eb; /* ZMIANA: Tło jest kolorowe domyślnie */
    border: 1px solid var(--border);
    color: var(--foreground); /* ZMIANA: Ikona jest jasna domyślnie */
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.copy-chat-btn:hover {
    background: none; /* ZMIANA: Tło staje się przezroczyste po najechaniu */
    color: var(--muted-foreground); /* ZMIANA: Ikona staje się przygaszona po najechaniu */
}

/* --- Style dla renderowania PDF --- */
#image-render-container {
    width: 800px;
    min-height: 600px;
    padding: 40px;
    box-sizing: border-box;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/img/moon_forest.png');
    background-size: cover;
    background-position: center;
    color: white;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

.render-header {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.render-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.render-message {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.7;
}

.render-message strong {
    display: block;
    margin-bottom: 12px;
    color: #ffeb3b;
    font-size: 16px;
    font-weight: bold;
}

.render-message div {
    margin-bottom: 8px;
}

.render-message p {
    margin-bottom: 12px;
    line-height: 1.6;
    text-align: justify;
}

.render-message ul, .render-message ol {
    margin-bottom: 12px;
    padding-left: 20px;
}

.render-message li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.render-message br {
    margin-bottom: 8px;
}

.render-message h1, .render-message h2, .render-message h3, .render-message h4 {
    margin-bottom: 10px;
    margin-top: 16px;
    color: #ffeb3b;
}

.render-message em {
    font-style: italic;
}

.render-message strong:not(.render-message > strong) {
    font-weight: bold;
    color: inherit;
    display: inline;
    margin-bottom: 0;
}

.render-footer {
    text-align: center;
    font-size: 14px;
    margin-top: 30px;
    opacity: 0.8;
}