html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

input[type="datetime-local"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.film-vu-page {
    width: calc(100% - 40px);
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0 60px;
    box-sizing: border-box;
}

.film-vu-header {
    margin-bottom: 28px;
}

.film-vu-header h1 {
    margin: 0 0 6px;
    color: #f2f3f5;
    font-size: 1.8rem;
}

.film-vu-header p {
    margin: 0;
    color: #7c8aa0;
    font-size: 0.9rem;
}

.film-vu-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 0.9rem;
}

.film-vu-message.success {
    border-color: #34543f;
    background: #17231b;
    color: #a7d8b3;
}

.film-vu-message.error {
    border-color: #623b3b;
    background: #29191a;
    color: #e7a8a8;
}

.watchlist-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid #334d6b;
    border-radius: 9px;
    background: #15202c;
}

.watchlist-notice-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.watchlist-notice-info > i {
    color: #5d9fe7;
    font-size: 1.1rem;
}

.watchlist-notice-info div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.watchlist-notice-info strong {
    color: #e5e9ed;
    font-size: 0.9rem;
}

.watchlist-notice-info span {
    color: #8896a5;
    font-size: 0.8rem;
}

.watchlist-notice button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #426c99;
    border-radius: 7px;
    background: #1c3c5d;
    color: #c5e0fb;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.watchlist-notice button:hover {
    background: #244d76;
}

.visionnage-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section {
    padding: 22px;
    border: 1px solid #252d36;
    border-radius: 11px;
    background: #0f141a;
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title > span {
    display: flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1d4e85;
    color: #d8eaff;
    font-size: 0.8rem;
    font-weight: 700;
}

.section-title h2 {
    margin: 0 0 3px;
    color: #e9ebee;
    font-size: 1rem;
}

.section-title p {
    margin: 0;
    color: #727e8d;
    font-size: 0.8rem;
}

.film-selector {
    position: relative;
}

.film-search-wrapper.hidden {
    display: none;
}

.film-search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid #303945;
    border-radius: 8px;
    background: #0a0e13;
}

.film-search-input:focus-within {
    border-color: #3b82f6;
}

.film-search-input > i {
    color: #647181;
}

.film-search-input input {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #edf0f3;
    font: inherit;
}

.film-search-input input::placeholder {
    color: #606c7a;
}

.film-search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 360px;
    overflow-y: auto;
    border-radius: 8px;
    background: #11171e;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.film-result {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 11px;
    padding: 9px;
    border: 0;
    border-bottom: 1px solid #242d36;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.film-result:first-child {
    border-radius: 8px 8px 0 0;
}

.film-result:last-child {
    border-bottom: 0;
    border-radius: 0 0 8px 8px;
}

.film-result:hover {
    background: #1a222c;
}

.result-poster {
    display: flex;
    width: 42px;
    height: 62px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    background: #0a0e13;
    color: #56616e;
}

.result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.result-info strong {
    overflow: hidden;
    color: #e6e9ec;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-info span {
    color: #747f8c;
    font-size: 0.77rem;
}

.search-status {
    padding: 15px;
    border: 1px solid #29323c;
    color: #7f8a97;
    font-size: 0.82rem;
}

.selected-film {
    display: none;
    align-items: center;
    gap: 13px;
    padding: 11px;
    border: 1px solid #2d4055;
    border-radius: 9px;
    background: #111a24;
}

.selected-film.visible {
    display: flex;
}

.selected-poster {
    display: flex;
    width: 48px;
    height: 70px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    background: #0a0e13;
    color: #586574;
}

.selected-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.selected-info strong {
    overflow: hidden;
    color: #e8ebee;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-info span {
    color: #7d8996;
    font-size: 0.8rem;
}

#change-film {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #34404c;
    border-radius: 6px;
    background: #182029;
    color: #9ba8b6;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

#change-film:hover {
    border-color: #48698c;
    color: #c0daf5;
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.type-card {
    cursor: pointer;
}

.type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card span {
    display: flex;
    height: 60px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #303945;
    border-radius: 8px;
    background: #0b1016;
    color: #8c98a5;
    transition: 0.15s ease;
}

.type-card input:checked + span {
    border-color: #3b82f6;
    background: #14253a;
    color: #cbe1fb;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field > label {
    color: #9ba5b0;
    font-size: 0.8rem;
}

.field input,
.field select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid #303945;
    border-radius: 7px;
    outline: 0;
    background: #0a0e13;
    color: #e6e9ed;
    font: inherit;
}

.field input:focus,
.field select:focus {
    border-color: #3b82f6;
}

.date-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.date-input-group button {
    padding: 0 13px;
    border: 1px solid #34404c;
    border-radius: 7px;
    background: #182029;
    color: #a7b3c0;
    font: inherit;
    cursor: pointer;
}

.date-input-group button:hover {
    border-color: #48698c;
    color: #c5dcf4;
}

.version-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.version-selector label {
    cursor: pointer;
}

.version-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.version-selector span {
    display: flex;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #303945;
    border-radius: 7px;
    background: #0a0e13;
    color: #818d9a;
    font-size: 0.85rem;
    font-weight: 600;
}

.version-selector input:checked + span {
    border-color: #3b82f6;
    background: #14253a;
    color: #cbe1fb;
}

.price-input {
    position: relative;
}

.price-input input {
    padding-right: 35px;
}

.price-input span {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #667280;
    transform: translateY(-50%);
    pointer-events: none;
}

.cinema-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.cinema-options label {
    cursor: pointer;
}

.cinema-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cinema-options span {
    display: flex;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #303945;
    border-radius: 7px;
    background: #0a0e13;
    color: #808c99;
    font-size: 0.8rem;
}

.cinema-options input:checked + span {
    border-color: #3b82f6;
    background: #14253a;
    color: #cbe1fb;
}

.type-section.hidden {
    display: none;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.form-submit button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #2878d0;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.form-submit button:hover {
    background: #3186e2;
}

.film-vu-page,
.film-vu-page * {
    box-sizing: border-box;
}

.form-section,
.form-grid,
.field,
.date-input-group,
.version-selector,
.type-selector,
.cinema-options {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 700px) {
    .film-vu-page {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 28px 14px 45px;
        box-sizing: border-box;
    }

    .form-section {
        padding: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .cinema-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .watchlist-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .watchlist-notice button {
        width: 100%;
    }
        .date-field {
        min-width: 0;
        width: 100%;
    }

    .date-input-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }

    .date-input-group input {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .date-input-group button {
        width: 100%;
        height: 42px;
        box-sizing: border-box;
    }
    
}

@media (max-width: 480px) {
    .type-selector {
        grid-template-columns: 1fr;
    }

    .date-input-group {
        grid-template-columns: 1fr;
    }

    .date-input-group button {
        height: 42px;
    }

    .selected-film {
        flex-wrap: wrap;
    }

    #change-film {
        width: 100%;
        justify-content: center;
    }

    .form-submit button {
        width: 100%;
    }
}