/* Ogólne ustawienia strony */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
}

#header-title {
    flex-grow: 1;
    text-align: center;
}

header h1 {
    margin: 0;
}

.select-container {
    display: flex;
    flex-direction: column;  /* Ustawia elementy w kolumnie */
    align-items: center;     /* Wyrównuje elementy na środku */
    margin: 20px 0;
}

select {
    font-size: 16px;
    padding: 10px;
    margin: 5px 0;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    border: 1px solid #ccc;
}


/* Style koszyka */
#cart-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

#cart-icon {
    cursor: pointer;
    font-size: 24px;
    position: relative;
    margin-right: 15px;
}

#cart-count {
    position: absolute;
    top: -6px;
    right: 0px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 14px;
}

#cart-menu {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    padding: 10px;
    display: none; /* Ukryte domyślnie */
    z-index: 100;
}

#cart-menu.active {
    display: block; /* Menu pojawia się po dodaniu klasy 'active' */
}

.cart-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-dropdown li {
    padding: 8px 0;
    border-bottom: 1px solid #f4f4f4;
}

.cart-dropdown button {
    width: 100%;
    padding: 10px;
    background-color: #5bc0de;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.cart-dropdown button:hover {
    background-color: #31b0d5;
}

/* Modal dialog */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.modal-content button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

.modal-content button:hover {
    background-color: #0056b3;
}

/* Komunikat o dodaniu do koszyka */
.cart-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.cart-message button {
    margin-top: 10px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.cart-message button:hover {
    background-color: #45a049;
}


/* Modal do komunikatu o wyczyszczeniu koszyka */
#clear-cart-modal {
    display: none; /* Ukryty na początku */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#clear-cart-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

#clear-cart-modal .modal-content button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

#clear-cart-modal .modal-content button:hover {
    background-color: #0056b3;
}



/* Style dla kontenera filmów */
#movies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* Style dla poszczególnych boxów z filmami */
.movie-box {
    background-color: white;
    border-radius: 10px;
    width: 250px; /* Zmniejszymy szerokość, żeby przypominało to design na vistream */
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Dodajemy efekt powiększenia przy najechaniu */
.movie-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Miniatura filmu (przykład rozmiaru i zaokrąglenia) */
.movie-thumbnail {
    width: 100%;
    height: 180px;  /* Zmniejszamy wysokość obrazu */
    object-fit: cover; /* Obrazek się dopasuje do kontenera */
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Tytuł filmu */
.movie-info h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
    height: 40px;  /* Dodanie stałej wysokości, aby tytuł nie zmieniał wysokości boxa */
    overflow: hidden;
    text-overflow: ellipsis;  /* Skrócenie tekstu jeśli jest zbyt długi */
}

/* Cena filmu */
.movie-info .price {
    font-size: 16px;
    color: #d9534f;
    margin-bottom: 15px;
}

/* Przycisk "Dodaj do koszyka" */
.add-to-cart {
    background-color: #5bc0de;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #31b0d5;
}

/* Dodatkowy styl przycisku dodania do koszyka w wersji aktywnej */
.add-to-cart:active {
    background-color: #1d8db6;
}

/* Styl dla cienia boxa przy interakcji */
.movie-box:active {
    transform: scale(0.98);
}

