/*modal.css*/
:root {
    --seat-size: 32px;
}

.month-year-modal {
    position: absolute;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
    min-width: 260px;
}

.month-year-modal.active {
    visibility: visible;
    opacity: 1;
}

.month-year-panel {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 16px;
    width: 280px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
}

.month-year-panel .years-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.month-year-panel .year-display {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
    flex: 1;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.month-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 8px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.month-btn:hover {
    background: rgba(93, 201, 201, 0.3);
    border-color: var(--accent-soft-teal);
    transform: scale(1.02);
}

.month-year-panel .close-modal-btn {
    margin-top: 12px;
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

.month-btn.current-month {
    border: 2px solid var(--accent-soft-teal);
    background: rgba(93, 201, 201, 0.2);
    box-shadow: 0 0 6px rgba(93, 201, 201, 0.4);
}

.modal-content.glass-modal {
    background: radial-gradient(ellipse at 30% 40%, #2a1f4a, #0f0a2a) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 28px !important;
    color: var(--text-light) !important;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4) !important;
    max-height: 90vh;
    overflow-y: auto;
}

.glass-modal .modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
}

.glass-modal .modal-header .modal-title {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.5rem;
}

.glass-modal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.glass-modal .modal-body {
    padding: 1.5rem;
}

.movie-info-modal {
    text-align: left;
    margin-bottom: 20px;
}

.movie-info-modal .poster {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 15px;
    border-radius: 16px;
    overflow: hidden;
}

.movie-info-modal .poster img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.movie-info-modal h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.movie-info-modal .movie-meta {
    margin: 8px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-info-modal .movie-meta span {
    display: inline-block;
    margin-right: 12px;
}

.calendar-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.age-restriction {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.movie-info-left {
    border-right: 1px solid var(--glass-border);
    padding-right: 20px;
}

.hall-right {
    padding-left: 20px;
}

.hall-scheme {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.seats-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 0;
    display: block;
    text-align: center;
}

.screen-wrapper {
    width: 100%;
    margin-bottom: 50px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 500px;
}

.screen-arc {
    width: 90%;
    height: 20px;
    border-top: 4px solid var(--accent-soft-teal);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    filter: drop-shadow(0 0 5px var(--accent-soft-teal));
}

.screen-text {
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 1em;
    color: var(--accent-soft-teal);
    opacity: 0.6;
    text-transform: uppercase;
}

.seats-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.seats-container:active {
    cursor: grabbing;
}

.seats-inner {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.seat-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.row-label {
    width: 25px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.seat {
    width: var(--seat-size);
    height: var(--seat-size);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.seat.free:hover {
    background: rgba(93, 201, 201, 0.6);
    transform: scale(1.02);
}

.seat.selected {
    background: var(--accent-soft-teal);
    color: #0a0718;
    border-color: #fff;
    box-shadow: 0 0 8px var(--accent-soft-teal);
}

.seat.taken {
    background: rgba(255, 80, 80, 0.5);
    border-color: #ff8080;
    cursor: not-allowed;
    opacity: 0.8;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    font-size: 11px;
    flex-wrap: wrap;
}

.seat-demo {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    margin-right: 5px;
    vertical-align: middle;
}

.seat-demo.free {
    background: rgba(220, 220, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.seat-demo.selected {
    background: var(--accent-soft-teal);
}

.seat-demo.taken {
    background: rgba(255, 80, 80, 0.5);
    border: 1px solid #ff8080;
}

.price-seat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.selected-seat-info {
    text-align: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
}

.ticket-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-soft-teal);
}

.modal-footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

#submitRatingBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px auto 0;
    width: fit-content;
}

.email-field {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-field label {
    font-size: 14px;
    opacity: 0.8;
}

.email-field input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 12px 15px;
    width: 100%;
    color: white;
}

.email-field input:focus {
    border-color: var(--accent-soft-teal);
    outline: none;
}

.email-field input.error {
    border-color: #ff5050;
    background: rgba(255, 80, 80, 0.1);
}

.email-field .error-message {
    color: #ff5050;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.modal-xl {
    max-width: 90vw;
    width: auto;
    margin: 1rem auto;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--accent-soft-teal);
    border-radius: 16px;
    padding: 14px 20px;
    min-width: 260px;
    max-width: 350px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    color: var(--text-light);
}

.toast-notification.success {
    border-left: 4px solid var(--accent-soft-teal);
}

.toast-notification.error {
    border-left: 4px solid #ff5050;
}

.toast-notification .toast-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1rem;
}

.toast-notification .toast-message {
    font-size: 0.85rem;
    opacity: 0.9;
}

.toast-notification .toast-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent-soft-teal);
    text-decoration: none;
    font-size: 0.8rem;
}

.toast-notification .toast-link:hover {
    text-decoration: underline;
}

#successModal .modal-content {
    text-align: center;
}

.success-icon {
    width: 80px;
    margin: 0 auto 20px;
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, var(--accent-soft-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.success-details {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.success-rating {
    margin: 25px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.success-rating p {
    margin-bottom: 10px;
    font-size: 14px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rating-stars span {
    font-size: 28px;
    cursor: pointer;
    transition: 0.2s;
    color: rgba(255, 255, 255, 0.3);
}

.rating-stars span:hover,
.rating-stars span.active {
    color: #ffc107;
}

.success-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.success-buttons .btn {
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
}

.btn-vk {
    background: var(--accent-soft-teal);
    color: #0a0718;
}

.btn-vk:hover {
    background: #fff;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-close-modal:hover {
    color: black;
    background: white;
}

.month-year-modal {
    z-index: 10000;
}

@media (max-width: 767px) {
    .month-year-modal {
        width: 90%;
        max-width: 300px;
    }

    .seats-container {
        justify-content: flex-start;
    }

    .month-year-panel {
        width: 100%;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .movie-info-left {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        margin-bottom: 20px;
        padding-bottom: 20px;
    }


    .hall-right {
        padding-left: 0;
    }

    .price-seat-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .seat {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .row-label {
        width: 35px;
        font-size: 10px;
    }

    .modal-xl {
        margin: 10px;
    }

    .toast-notification {
        min-width: 220px;
        padding: 10px 16px;
    }

    .stocks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stock-card {
        height: 280px;
    }
}

@media (max-width: 1200px) {
    .modal-xl {
        max-width: 95%;
        margin: 1rem auto;
    }
}