@import url('https://fonts.googleapis.com/css2?family=Arvo:wght@700&family=Lexend:wght@100..900&display=swap');

* {
    box-sizing: border-box;
}

#marquee {
    color: #000;
    width: 60%;
    height: 3em;
    margin: 20px auto;
    margin-bottom: 50px;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    background-size: 100% 1em;
    background-color: #92866A;
    font-size: 2.5em;
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent, rgba(0, 0, 0, 0.4)), 
                      linear-gradient(to right, transparent, transparent 12.5%, grey 12.5%, transparent 12.7%, transparent 25%, grey 25%, transparent 25.2%, transparent 37.5%, grey 37.5%, transparent 37.7%, transparent 50%, grey 50%, transparent 50.2%, transparent 62.5%, grey 62.5%, transparent 62.7%, transparent 75%, grey 75%, transparent 75.2%, transparent 87.5%, grey 87.5%, transparent 87.6%), 
                      linear-gradient(to bottom, white, white 25%, grey 25%, white 27%, white 75%, grey 75%, white 77%);
}

#marquee a {
    text-decoration: none;
    color: #000;
}

#movie-title:hover {
    text-decoration: underline;
}

.film-poster {
    width: 100px;
    height: auto;
    margin: 10px;
    display: table-cell;
    vertical-align: middle;
}

#marquee .marquee_message {
    width: 100%;
    height: 3em;
    display: table;
}

#marquee .marquee_message > span {
    display: table-cell;
    vertical-align: middle;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    margin: 5% auto;
    padding: 2em;
    border: none;
    width: 90%;
    max-width: 1000px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1.5em;
    top: 1em;
    color: #fff;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

#movieTitle {
    text-align: center;
    font-size: 2.5em;
}

.seats-grid {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    gap: 12px;
    justify-items: center;
    margin-top: 20px;
}

.seat-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.row-label {
    font-weight: bold;
    margin-right: 10px;
}

.seat {
    width: 40px;
    height: 60px;
    background-color: #5cb85c;
    border-radius: 5px 5px 0 0;
    position: relative;
    cursor: pointer;
}

.seat::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 15px;
    background-color: #333;
    border-radius: 0 0 5px 5px;
}

.seat.unavailable {
    background-color: #d9534f;
    cursor: not-allowed;
}

.seat.selected {
    background-color: #f0ad4e;
}

.seat.available:hover {
    background-color: #7bcd7b;
}

.date-option {
    cursor: pointer;
    padding: 10px;
    background-color: #ccc;
    margin: 5px;
    text-align: center;
    border-radius: 5px;
}

.date-option:hover {
    background-color: #aaa;
}

#seatSelection {
  display: none;
}

/* Payment Button */
#proceedToPayment {
    display: none;
    margin-top: 20px;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#proceedToPayment:hover {
    background-color: #0056b3;
}

/* Payment Modal Styles */
.payment-modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    margin: 5% auto;
    padding: 2em;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    animation: modalFadeIn 0.3s ease-out;
}

/* Payment Form Styles */
.payment-form input {
    width: 100%;
    padding: 1em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    transition: all 0.3s ease;
}

.submit-payment {
    background: linear-gradient(135deg, #007bff, #00bcd4);
    color: #fff;
    padding: 1em;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1em;
}

.submit-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Date and Time Options */
.date-option, .time-option {
  padding: 10px;
  margin: 5px;
  border: 2px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.date-option.selected, .time-option.selected {
  background-color: #f0ad4e;
  border-color: #f0ad4e;
  color: white;
}

/* Loading spinner */
.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Movie Poster, Title, and Synopsis */
.movie-info {
    display: flex;
    gap: 2em;
    margin-bottom: 2em;
    align-items: flex-start;
}

.movie-poster {
    width: 250px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.movie-poster:hover {
    transform: scale(1.02);
}

.synopsis {
    flex: 1;
    font-size: 1.1em;
    line-height: 1.6;
    color: #e0e0e0;
}

.trailer-link {
  display: inline-block;
  padding: 10px 15px;
  background-color: #337ab7;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

/* Adjust the trailer button size and position */
.trailer-link {
  display: block;                  /* Ensures it takes up the full width under the poster */
  width: 120px;                    /* Smaller width */
  padding: 5px 10px;               /* Smaller padding */
  background-color: #337ab7;       /* Keep background color */
  color: white;                    /* Keep text color */
  text-align: center;              /* Center the text */
  font-size: 14px;                 /* Smaller font size */
  border-radius: 5px;              /* Rounded corners */
  margin: 10px auto 0;             /* Center the button and add space above */
  transition: background-color 0.3s ease;
}

.trailer-link:hover {
  background-color: #286090;       /* Change on hover */
}


/* Seating Plan */
#seat-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  visibility: hidden; /* Seats hidden initially */
}

.seat-row {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.row-label {
  margin-right: 10px;
  font-weight: bold;
}

.seat {
  width: 40px;
  height: 60px;
  background-color: #5cb85c;
  border-radius: 5px 5px 0 0;
  position: relative;
  cursor: pointer;
  margin: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: white;
  font-weight: bold;
}

.seat.unavailable {
  background-color: #d9534f;
  cursor: not-allowed;
}

.seat.selected {
  background-color: #f0ad4e;
}

.seat.available:hover {
  background-color: #7bcd7b;
}

/* Payment Overlay */
#payment-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 2px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
  display: none;
  width: 500px;
  text-align: center;
}

#proceed-to-payment {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#proceed-to-payment:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Payment details */
.payment-details {
  margin: 10px 0;
  text-align: left;
}

.payment-details strong {
  display: block;
  margin-top: 10px;
}

.total-cost {
  font-size: 18px;
  font-weight: bold;
}

@media screen and (max-width: 900px) { 
    #marquee {
        width: 80%;
        height: auto;
        font-size: 17px;
    }

    .film-date {
        padding: 10px;
        font-size: 13px;
    }
}

/* Seat Selection Styles */
#seatSelection {
    margin-top: 2em;
    background: rgba(255, 255, 255, 0.05);
    padding: 2em;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#seatSelection h3 {
    color: #fff;
    margin-bottom: 1.5em;
    font-size: 1.5em;
    text-align: center;
}

.seats-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
    margin: 2em 0;
    padding: 2em;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    position: relative;
}

/* Screen visualization */
.seats-grid::before {
    content: 'SCREEN';
    position: absolute;
    top: -2em;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #fff, #ccc);
    padding: 0.5em 3em;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.seat-row {
    display: flex;
    gap: 1em;
    align-items: center;
    position: relative;
}

.row-label {
    color: #fff;
    font-weight: bold;
    min-width: 2em;
    text-align: center;
    opacity: 0.7;
}

.seat {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: #fff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seat::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 3px 3px;
}

.seat:hover:not(.unavailable) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.seat.selected {
    background: linear-gradient(135deg, #007bff, #00bcd4);
    border: none;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.seat.unavailable {
    background: rgba(255, 0, 0, 0.2);
    cursor: not-allowed;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Seat Legend */
.seat-legend {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin-top: 2em;
    padding: 1em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #fff;
}

.legend-seat {
    width: 25px;
    height: 25px;
    border-radius: 5px 5px 0 0;
    position: relative;
}

.legend-seat::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 2px 2px;
}

.legend-seat.available {
    background: rgba(255, 255, 255, 0.1);
}

.legend-seat.selected {
    background: linear-gradient(135deg, #007bff, #00bcd4);
}

.legend-seat.unavailable {
    background: rgba(255, 0, 0, 0.2);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .seats-grid {
        padding: 1em;
        gap: 1em;
    }

    .seat {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }

    .seat-row {
        gap: 0.5em;
    }

    .seat-legend {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }
}

/* Standardized H3 Styles */
h3 {
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Page Title H3 */
h3.page-subtitle-divider {
    text-align: center;
    font-size: 2em;
    margin: 1.5em 0;
    color: #fff;
    position: relative;
    padding-bottom: 0.5em;
}

h3.page-subtitle-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
}

/* Section H3 (for modals, etc) */
#seatSelection h3,
#dateSelection h3,
.modal h3:not(.page-subtitle-divider) {
    font-size: 1.5em;
    color: #fff;
    margin-bottom: 1.5em;
    text-align: center;
    position: relative;
    padding-bottom: 0.5em;
}

#seatSelection h3::after,
#dateSelection h3::after,
.modal h3:not(.page-subtitle-divider)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
}

/* Footer H3 */
footer h3 {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 1em;
    text-align: left;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    h3.page-subtitle-divider {
        font-size: 1.8em;
        margin: 1.2em 0;
    }

    #seatSelection h3,
    #dateSelection h3,
    .modal h3:not(.page-subtitle-divider) {
        font-size: 1.3em;
        margin-bottom: 1.2em;
    }

    footer h3 {
        font-size: 1.1em;
    }
}
