:root {
    --main-font: "NT Somic";
    --main-color: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input, button, textarea {
    outline: none;
}

html, body {
    width: 100%;
    height: auto;
    overflow-x: hidden;
}

body {
    font-family: var(--main-font);
    color: var(--main-color);
    font-weight: 400;
    line-height: 1.2;
}

a {
    color: var(--main-color);
    text-decoration: none;
    transition: color .3s ease;
}

.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.main {
    flex-grow: 1;
}

.container {
    width: 100%;
    max-width: 1125px;
    margin: 0 auto;
    padding: 0 15px;
}

#content {
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 100vh;
    background-image: url('../img/main-bg.png');
    background-size: cover;
}

.roll {
    position: relative;
    width: 770px;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
    z-index: 10;
}

.roll-mask {
    background-image: url('../img/roll_mask.png');
    width: 770px;
    height: 770px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 2;
    position: relative;
}

.sectors {
    position: absolute;
    z-index: 1;
    width: 625px;
    height: 625px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sectors img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: center;
}

.lights {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    width: 50%;
    background-image: url("../img/lights.png");
    background-position: center;
    /*background-size: contain;*/
}

.gifts {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 11;
    width: 1000px;
}

.gifts img {
    display: block;
    width: 100%;
    height: auto;
}

.ring {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 220px;
}

.ring img {
    width: 100%;
    height: auto;
    display: block;
}

.serg {
    position: absolute;
    top: 0;
    left: 50%;
    width: 500px;
    transform: translateX(-50%);
}

.serg img {
    width: 100%;
    height: auto;
    display: block;
}

.main-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form {
    max-width: 720px;
    z-index: 3;
    position: relative;
    margin: 0 80px 0 0;
}

.form-title {
    font-family: "NT Somic Bd";
    font-weight: 600;
    font-size: 55px;
    line-height: 105%;
    text-transform: uppercase;
    text-align: center;
    color: #fffdf3;
    margin-bottom: 24px;
}

.form-title span {
    display: block;
    color: #ff919e;
}

.form-subtitle {
    font-family: "NT Somic Med";
    font-weight: 500;
    font-size: 25px;
    line-height: 100%;
    text-align: center;
    color: #fffdf3;
}

.form form {
    padding-top: 50px;
    max-width: 530px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin: 0 auto;
}

.form-input {
    width: 100%;
}

.form-input input[type="text"] {
    height: 80px;
    background: #fff;
    width: 100%;
    border-radius: 10px;
    border: none;
    width: 100%;
    padding: 30px 25px;

    font-family: var(--main-font);
    font-weight: 400;
    font-size: 27px;
    line-height: 196%;
    letter-spacing: -0.02em;
    color: #333333;
}

.form-input input[type="text"]::placeholder {
    color: #c1c1c1;
}

.form-input input[type="submit"] {
    height: 80px;
    background: #f3b7c3;
    width: 100%;
    border-radius: 10px;
    border: none;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: 'NT Somic Med';
    font-weight: 500;
    font-size: 27px;
    line-height: 196%;
    color: #7b0f39;
}

.form-input input[type="submit"]:hover {
    background: #ff919e;
}

/* Подложка */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px); /* Блюр фона */
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Контент модалки */
.modal-content {
    background: #7d0f3a;
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 720px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Заголовки */
.modal-content h2 {
    font-family: 'NT Somic Bd';
    font-weight: 600;
    font-size: 30px;
    line-height: 117%;
    text-transform: uppercase;
    text-align: center;
    color: #fffdf3;
    margin-bottom: 32px;
}

.modal-content h3 {
    font-family: 'NT Somic Bd';
    font-weight: 600;
    font-size: 40px;
    line-height: 95%;
    text-transform: uppercase;
    text-align: center;
    color: #ff919e;
}

/* Коробка */
.gift-box {
    width: 100%;
    height: auto;
    max-width: 480px;
}

/* Инструкции */
.instructions {
    font-family: 'NT Somic Med';
    font-weight: 500;
    font-size: 16px;
    line-height: 112%;
    text-align: center;
    color: #fffdf3;
    max-width: 400px;
    display: block;
    width: 100%;
    margin: 0 auto;
}

/* Общий контейнер */
.checkbox-group {
    background-color: #1a5e3c; /* Темно-зелёный фон как на фото */
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Элемент чекбокса */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    position: relative;
}

/* Стилизация чекбокса */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    border: 2px solid #f3b7c3; /* Белая рамка */
    background-color: transparent;
    cursor: pointer;
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

/* При наведении */
.custom-checkbox:hover {
    border-color: #f3b7c3;
}

/* Когда отмечен */
.custom-checkbox:checked {
    background-color: #f3b7c3;
    border-color: #f3b7c3;
}

/* Галочка внутри (через псевдоэлемент) */
.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Стиль текста */
.custom-label {
    color: #ffffff; /* Белый текст */
    font-size: 14px;
    line-height: 1.5;
    margin-left: 10px;
    user-select: none;
    cursor: pointer;

    font-family: var(--main-font);
    font-weight: 400;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #4aab79;
}

/* Ссылки внутри текста */
.custom-label a {
  color: inherit;
    text-decoration: underline;
}

.custom-label a:hover {
    color: #ffff99;
}

/* Ошибки валидации */
.checkbox-item .errorMessage {
    position: absolute;
    bottom: -15px;
    left: 0;
    color: red;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.more-action-link {
    text-align: center;
}

.more-action-link a {
    font-family: var(--main-font);
    font-weight: 400;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: -0.02em;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #f3b7c3;
}


@media (max-width: 767px) {
    body {
        width: 100%;
        overflow-x: hidden;
    }
    .main-wrapper {
        flex-direction: column-reverse;
    }

    .roll {
        padding-bottom: 30px;
        width: 350px;
        height: auto;
    }

    .roll-mask {
        width: 350px;
        height: 350px;
    }

    .sectors {
        width: 305px;
        height: 305px;
    }

    .gifts {
        width: 120%;
    }

    .lights {
        bottom: 0;
        top: auto;
        width: 100%;
        height: 40%;
        background-image: url("../img/lights-mob.png");
    }

    .ring {
        width: 80px;
        top: 80px;
        bottom: auto;
        right: auto;
        left: 0;
    }

    .serg {
        width: 110px;
        right: 0;
        left: auto;
        transform: none;
        top: 115px;
    }

    .form {
        padding: 45px 30px 45px;
        margin: 0;
    }

    .form-title {
        font-size: 32px;
        margin-bottom: 80px;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .form-input input[type="text"] {
        height: 40px;
        padding: 15px;
        font-size: 13px;
        border-radius: 5px;
    }

    .form-input input[type="submit"] {
        height: 40px;
        font-size: 16px;
        border-radius: 5px;
    }

    .custom-label {
        font-size: 10px;
    }

    .more-action-link a {
        font-size: 10px;
    }

    .form form {
        padding-top: 30px;
        gap: 15px;
    }

    .main {
        flex-grow: 1;
        width: 100%;
        overflow-x: clip;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .modal-content h3 {
        font-size: 26px;
    }

    .instructions {
        font-size: 14px;
    }

    #content {
        background-image: url('../img/main-bg-mob.png');
    }

}



@media (max-width: 1600px) and (min-width: 768px) {
    .gifts {
        width: 850px;
    }
    .form {
        max-width: 620px;
        z-index: 3;
        position: relative;
        margin: 0 40px 0 0;
    }
    .ring {
        width: 140px;
    }
    .serg {
        width: 400px;
    }
}

@media (max-width: 1440px) and (min-width: 768px) {
    .gifts {
        width: 800px;
    }
    .roll {
        width: 670px;
    }
    .roll-mask {
        width: 670px;
        height: 670px;
    }
    .sectors {
        width: 575px;
        height: 575px;
    }
    .form {
        width: 560px;
    }
}

@media (max-width: 1380px) and (min-width: 768px) {
    .gifts {
        width: 775px;
    }
    .form-title {
        font-size: 45px;
    }
    .ring {
        width: 100px;
    }
    .serg {
        width: 350px;
    }
}

@media (max-width: 1280px) and (min-width: 768px) {
    .form {
        width: 470px;
    }
    .gifts {
        width: 745px;
    }
    .form-title {
        font-size: 40px;
    }
    .ring {
        width: 100px;
    }
    .serg {
        width: 350px;
    }
    .form-subtitle {
        font-size: 22px;
    }
}

.errorMessage {
    font-size: 12px;
    color: red;
}