* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    text-align: center;
    background: #121212;
    color: white;
    padding: 20px;
}

.login-container {
    max-width: 300px;
    margin: 100px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
    text-align: center;
}

.login-container input {
    width: 95%;
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    outline: none;
}

.loginBtn {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    background-color: #4caf50;
    border: none;
    cursor: pointer;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
}

button:hover {
    background: green;
}

button:active {
    background: blue;

}

.history-link {
    color: white;
    text-decoration: none;
    margin: 20px 5px;
    padding: 10px;
    background-color: #4caf50;
    border: none;
    cursor: pointer;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
}

.history-link:hover {
    background: green;
}

.history-link:active {
    background: blue;

}


.movie-container {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.movie-card {
    background: #222;
    border-radius: 10px;
    padding: 10px;
    width: 180px;
    cursor: pointer;
    transition: transform 0.2s;
}

.movie-card:hover {
    transform: scale(1.05);
}

.movie-card img {
    width: 100%;
    border-radius: 10px;
}

.movie-card h3 {
    font-size: 16px;
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    /* border: 2px solid blue; */
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: black;
    color: white;
    margin: 0 auto;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    /* border: 3px solid red; */
    height: auto;
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;

}

.date-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;

}

.date-item {
    background: #444;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;

}

.date-item.selected {
    background: #ec0202;
    color: #000;
    font-weight: bold;

}

.theatre-block {
    background: #333;
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
}

.time-btn {
    margin: 5px;
    padding: 8px 12px;
    background: #03dac5;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: black;
    font-weight: bold;
}

/* seat page */


.screen {
    background: #ccc;
    height: 60px;
    margin: 20px auto;
    width: 70%;
    border-radius: 50% 50% 0 0;
    box-shadow: 0 10px 30px rgba(200, 237, 227, 0.9);
}

.seat-container {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    justify-self: center;
    gap: 10px;
    padding: 20px;
}

.seat-legend-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
    color: #fff;
    font-size: 14px;
}

.legend {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 4px;
}

.legend.unbooked {
    background: #ccc;
}

.legend.selected {
    background: green;
}

.legend.booked {
    background: red;
}

.seat {
    width: 40px;
    height: 40px;
    background: #444;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    user-select: none;
}

.seat:hover {
    transform: scale(1.1);
}

.seat.selected {
    background-color: green;
}

.seat.booked {
    background-color: red;
    cursor: not-allowed;
}

.modal-content {
    background: #0f0f0f;
    padding: 15px;
    border-radius: 12px;
    width: 320px;
    text-align: center;
}

.ticket-content {
    border: 2px dashed #444;
}


.ticket-poster {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}


#confirmTitle {
    font-size: 18px;
    margin-bottom: 10px;
}

.dotter-line {
    border-top: 2px dashed #444;
    margin: 10px 0;
    padding-top: 8px;
    font-size: 13px;
}


.booking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}


.booking-datails {
    flex: 1;
    text-align: left;
    font-size: 13px;
}

.booking-datails p {
    margin: 4px 0;
}

#qrcode {
    width: 90px;
    height: 90px;
    background: white;
    padding: 4px;
    border-radius: 6px;
    flex-shrink: 0;
}

#qrcode canvas,
#qrcode img {
    width: 100% !important;
    height: 100% !important;

}

.downloadBtn {
    margin-top: 10px;
    padding: 10px 15px;
    background: #ff9800;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}


/* History page  */
.history-container {
    padding: 20px;
    text-align: center;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 20px;
    justify-content: center;
    /* center all items */
    margin-top: 20px;
}

.history-card {
    width: 300px;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 12px;
    text-align: left;
    transition: 0.3s;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.history-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.history-card h3 {
    margin: 10px 0;
}

.history-card p {
    font-size: 14px;
    margin: 5px 0;
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    background: #ff4c4c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #ff1a1a;
}


@media (max-width: 746px) {
    .screen {
        width: 90%;
    }

    .seat-legend-row {
        flex-direction: column;
        gap: 5px;
    }
}