/* --- Podstawowe Ustawienia i Czcionki --- */
body {
    /* Pamiętaj o zaimportowaniu czcionek 'Inter' i 'Playfair Display' np. z Google Fonts */
    font-family: 'Inter', sans-serif; 
    background-color: #0a0a0a;
    background-image: linear-gradient(to bottom right, #111827, #000000);
    color: #d1d5db;
    cursor: none; /* Ukrywa domyślny kursor */
    overflow-x: hidden; /* Zapobiega poziomemu scrollowaniu */
    margin: 0;
    line-height: 1.6; /* Poprawia czytelność tekstu */
    /* overflow-y: auto; */ /* Możesz to włączyć, jeśli strona ma być przewijana pionowo */
}

/* --- Niestandardowy Kursor --- */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #ec4899; /* Różowy kolor */
    border-radius: 50%;
    position: fixed;
    pointer-events: none; /* Kursor nie blokuje kliknięć */
    transform: translate(-50%, -50%); /* Centruje kursor na jego punkcie */
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    z-index: 9999;
}

/* --- Kontrolka Dźwięku --- */
.sound-control {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 50;
    cursor: pointer;
    color: white;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.sound-control:hover {
    opacity: 1;
}
.hidden {
    display: none !important; /* Ważne, aby to było pewne ukrycie elementu */
}

/* --- Główny Kontener Treści --- */
.main-content {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 3rem 1rem;
    min-height: calc(100vh - 6rem); /* Upewnia się, że treść zajmuje co najmniej wysokość okna - padding */
}

/* --- Sekcja Nagłówka z Dużym Wideo --- */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}
.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: bold;
    color: #ec4899;
    text-shadow: 0 0 15px rgba(236, 72, 153, 0.7);
    margin-bottom: 2rem;
}
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Proporcje 16:9 dla wideo */
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.3);
    border: 1px solid rgba(236, 72, 153, 0.5);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Style dla Sekcji --- */
.whisper-of-the-day-section {
    margin-bottom: 2rem;
    text-align: center;
}
section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
section > p {
    max-width: 48rem;
    margin: 0 auto 2.5rem auto;
    color: #9ca3af;
}

/* --- Nawigacja Zakładek --- */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #374151;
    padding-bottom: 1rem;
}
.tab-link {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #9ca3af;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s, border-bottom-color 0.3s;
    border-bottom: 2px solid transparent;
}
.tab-link:hover {
    color: white;
}
.tab-link.active {
    color: #ec4899;
    border-bottom-color: #ec4899;
}

/* --- Kontent Zakładek --- */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- Pudełka na Treść (Szept, Kreator) --- */
.output-box {
    font-style: italic;
    font-size: 1.25rem;
    color: #9ca3af;
    max-width: 48rem;
    margin: 0 auto;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.creator-wrapper, .confession-wrapper, .memoriam-wrapper, .chat-wrapper {
    max-width: 48rem;
    margin: 0 auto;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 2rem;
    border: 1px solid rgba(236, 72, 153, 0.5);
}
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
input[type="text"], textarea {
    flex-grow: 1;
    background-color: #1f2937;
    border: 1px solid #374151;
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    resize: vertical;
    font-size: 1rem;
}
input[type="text"]:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ec4899;
    border-color: #ec4899;
}
button {
    background-color: #db2777;
    color: white;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
button:hover {
    background-color: #be185d;
    transform: translateY(-2px);
}
button:disabled {
    background-color: #4a1f33;
    cursor: not-allowed;
    transform: none;
}
#story-output {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    min-height: 150px;
    color: #d1d5db;
    white-space: pre-wrap;
    line-height: 1.7;
    text-align: left;
    overflow-y: auto;
}

/* --- Sekcja "Moje Wyznanie" --- */
.confession-wrapper textarea {
    margin-bottom: 1rem;
}
#confession-confirmation {
    margin-top: 1rem;
    color: #ec4899;
    font-style: italic;
    text-align: center;
}

/* --- Sekcja "In Memoriam" --- */
.memoriam-wrapper textarea {
    margin-bottom: 1.5rem;
}
.file-upload-wrapper {
    margin-bottom: 1.5rem;
    border: 2px dashed #374151;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}
.file-upload-wrapper:hover {
    border-color: #ec4899;
}
.file-upload-wrapper label {
    cursor: pointer;
}
.file-upload-wrapper input[type="file"] {
    display: none;
}
#tribute-output {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    min-height: 100px;
    color: #d1d5db;
    white-space: pre-wrap;
    line-height: 1.7;
    text-align: left;
    overflow-y: auto;
}

/* --- Sekcja Czat --- */
.chat-window {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    max-width: 80%;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-message.user {
    background-color: #db2777;
    color: white;
    align-self: flex-end;
}
.chat-message.eva {
    background-color: #374151;
    color: #d1d5db;
    align-self: flex-start;
}
.chat-input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.chat-input-group button {
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
}


/* --- Galeria Produktów (GRID) --- */
#gallery-container { /* Użyj ID bezpośrednio, bo JS tak go pobiera */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    justify-items: center;

    /* ***** KLUCZOWE ZMIANY DLA WYŚWIETLANIA WSZYSTKICH PRODUKTÓW ***** */
    /* Upewnij się, że te właściwości są zastosowane i nie są nadpisywane przez inne style */
    overflow: visible !important; /* WAŻNE: Upewnia się, że nic nie jest przycinane */
    height: auto !important;     /* WAŻNE: Upewnia się, że wysokość jest dynamiczna */
    max-height: none !important; /* WAŻNE: Usuwa wszelkie limity maksymalnej wysokości */
    /* *************************************************************** */
}

.product-card {
    width: 100%;
    max-width: 280px;
    height: 400px; /* Stała wysokość karty */
    background-color: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.1s ease-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.product-card img {
    width: 100%;
    height: 100%; /* Obrazek wypełnia całą wysokość karty */
    object-fit: cover; /* Dopasowuje obrazek do ramki, zachowując proporcje */
    transition: transform 0.5s ease;
}
.product-card:hover img {
    transform: scale(1.1);
}
.product-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 1.5rem;
    color: white;
    font-family: 'Playfair Display', serif;
}
.product-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* --- Okno Modalne (Pop-up) --- */
#product-modal { /* Zgodnie z JS, używamy ID */
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    transition: opacity 0.3s ease;
    opacity: 0; /* Domyślnie ukryty poprzez opacity */
    pointer-events: none; /* Umożliwia klikanie przez ukryty modal */
}

#product-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #111827;
    border: 1px solid #ec4899;
    border-radius: 1.5rem;
    box-shadow: 0 0 50px rgba(236, 72, 153, 0.5);
    padding: 2rem;
    max-width: 32rem;
    width: 100%;
    text-align: center;
    position: relative;
    color: #d1d5db;
}
#close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
#close-modal:hover {
    color: #ec4899;
}
.modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}
.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.modal-content a {
    display: inline-block;
    width: 100%;
    background-color: #db2777;
    color: white;
    font-weight: bold;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    font-size: 1rem;
}
.modal-content a:hover {
    background-color: #be185d;
    transform: translateY(-2px);
}


/* --- Stopka --- */
.site-footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: #6b7280;
}
.site-footer p:first-child {
    margin-bottom: 0.5rem;
}

/* --- Loader --- */
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Media Queries dla responsywności --- */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    section h2 {
        font-size: 1.75rem;
    }
    .input-group {
        flex-direction: column;
    }
    .input-group button {
        width: 100%;
    }
    .tab-navigation {
        flex-wrap: wrap;
    }
    .tab-link {
        padding: 0.5rem 1rem;
    }
    .creator-wrapper, .confession-wrapper, .memoriam-wrapper, .chat-wrapper {
        padding: 1rem;
        border-radius: 1rem;
    }
    .product-card {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1.5rem 0.5rem;
    }
    .main-title {
        font-size: 2.5rem;
    }
    section h2 {
        font-size: 1.5rem;
    }
    .product-card {
        width: 95%; /* Na bardzo małych ekranach, karty mogą być nieco węższe */
    }
}