

:root {
    --bg-dark: #455A44;
    --card-light: #E8F5E9;
    --accent-lime: #9CCC65;
    --btn-green: #8BC34A;
    --text-black: #212121;
    --text-gray: #616161;
    --footer-link: #CFD8DC;
    --footer-text: #B0BEC5;
    --card-border: #2E7D32;
    --shadow-green: rgba(46, 125, 50, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: "Playpen Sans", cursive;
    background: #f3f3f3;
    color: var(--text-black);
    min-height: 100vh;
}
#hero-text {
    overflow-y: hidden;
    resize: none;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 16px 24px;
}

.header {
    margin: 0 auto;
    padding: 10px 10px;
}

.header-img {
    width: 200px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

/* Hero секция */
.hero {
    margin-top: 15px;
}









/* Контейнер для формы и телефона — теперь розовый, как левая форма */
.hero-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 10px;
    background: #ffe7ea;
    border-radius: 20px;
    padding: 20px 5px;
    box-shadow: 0 4px 16px rgba(221, 191, 195, 1);
    flex-wrap: wrap;
}

/* Левая форма — прозрачная внутри */
.hero-form {
    background: transparent;
    border-radius: 20px;
    width: 60%;
    max-width: 600px;
    padding-left: 20px;
}

.hero-headline {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-black);
    text-align: center;
}

/* Стили для формы */
label {
    font-weight: 600;
    color: black;
    display: block;
    
}

input, textarea {
    width: 100%;
    margin: 8px 0 16px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #982030;
    box-shadow: 0 0 0 2px rgba(75, 103, 65, 0.2);
}

/* Кнопки-пресеты */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    color: black;
}

.preset-btn {
    background: #ffcfd5;
    border: 1px solid #ddbfc3;
    border-radius: 20px;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: black;
}

.preset-btn:hover {
    background: #ddbfc3;
    color: white;
    border: 2px solid #982030;
}

/* Телефон справа */
/*
.hero-preview {

    width: 340px !important;
    min-height: 580px !important;


    background-size: cover;
    background-position: center;
    border-radius: 40px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 30px 50px  rgba(0, 0, 0, 0.1), 0 0 0 8px #333, 0 0 0 10px #555;
    flex-shrink: 0;
    margin-bottom: 20px;
    gap: 0px;
    justify-content: center;

}*/















/* Плавное появление шрифтов */
.preview-title,
.preview-text {
    transition: font-family 0.1s ease, color 0.1s ease;
    will-change: font-family, color;
}

/* Для всех шрифтов, которые могут загружаться */
.font-card {
    transition: all 0.2s ease;
}

/* Предзагрузка шрифтов - скрываем "скачок" текста */
.font-card {
    font-display: swap;
}











.preview-title {
   
display: flex;              /* ← добавляем */
    justify-content: center;    /* ← центрируем по горизонтали */
    align-items: center;        /* ← центрируем по вертикали */
    flex-direction: column;     /* ← если нужно, чтобы содержимое шло в колонку */
    
    font-size: 22px;
    text-align: center;
    word-break: break-word;
    font-weight: bold;
    margin: 0 auto;             /* ← центрируем сам блок */
    padding: 15px 8px 8px 8px;
    max-width: 260px;
    animation: slideFromTop 0.6s ease forwards;

    
}

.preview-spacer {
    flex: 1;
}

.preview-bottom {
    margin-bottom: 20px;
    text-align: center;
}

/* Текст поздравления в превью - без скролла */
.preview-text {
    

    font-size: 18px;
    text-align: center;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.4;
    margin: 5px 0 5px 0;
    padding: 0px 8px 8px 8px;
    max-width: 300px;
    width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
    animation: slideFromBottom 0.6s ease 0.2s both;
}

/* ========== БАЗОВЫЕ СТИЛИ КНОПОК (КАК В ИТОГОВОЙ ОТКРЫТКЕ) ========== */
.preview-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0px 0 5px 0;
}

.preview-btn-yes {
    background: #c02a2a;
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(192, 42, 42, 0.3);
    flex: 1;
    max-width: 160px;
    min-width: 140px;
    padding: 14px 0;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    /* ДОБАВЛЯЕМ ДЛЯ ПЕРЕНОСА ТЕКСТА */
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.preview-btn-no {
    background: transparent;
    color: black;
    border: 2px solid black;
    flex: 1;
    max-width: 160px;
    min-width: 140px;



    padding: 14px 0;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    /* ДОБАВЛЯЕМ ДЛЯ ПЕРЕНОСА ТЕКСТА */
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}


/*
.preview-btn-yes {
    background: #c02a2a;
    color: white;
}

.preview-btn-no {
    background: rgba(0,0,0,0);
    color: black;
    border: 2px solid black;
    border-radius: 30px;
}*/

.preview-btn-yes:hover, .preview-btn-no:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ========== АДАПТАЦИЯ КНОПОК ДЛЯ ВСЕХ ЭКРАНОВ ========== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 160px;
        min-width: 160px;
        padding: 16px 0;
        font-size: 20px;
    }
    
   
}

/* Планшеты и большие телефоны (до 768px) */
@media (max-width: 768px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
    
  
}

/* Телефоны (480px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
   .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
}

/* Большие телефоны (до 480px) */
@media (max-width: 480px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
}

/* Маленькие телефоны (375px - 479px) */
@media (max-width: 479px) and (min-width: 376px) {
   .preview-btn-yes,
    .preview-btn-no {
        max-width: 130px;
        min-width: 130px;
        padding: 13px 0;
        font-size: 18px;
    }

    
 
}

/* Маленькие телефоны (до 375px) */
@media (max-width: 375px) {
        .preview-btn-yes,
    .preview-btn-no {
        max-width: 100px;
        min-width: 100px;
        padding: 10px 0;
        font-size: 15px;
    }
 .preview-btn-no {
     border: 1px solid black;
}

    
   
}

/* Очень маленькие телефоны (до 320px) */
@media (max-width: 320px) {
     .preview-btn-yes,
    .preview-btn-no {
        max-width: 100px;
        min-width: 100px;
        padding: 10px 0;
        font-size: 15px;
    }
 .preview-btn-no {
     border: 1px solid black;
}


}













/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.reactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.reaction-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.reaction-card:hover {
    border-color: #8BC34A;
    transform: scale(1.05);
}

.reaction-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.reaction-card span {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}

.reaction-text {
    height: 80px;
    overflow: hidden;
    padding: 10px;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Навигация по шагам */
.steps-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 5px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 0.8;
}

.step-circle {
    width: 40px;
    height: 40px;
    background-color: #982030;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(221, 191, 195, 1);
}

.step-item.active .step-circle {
    background-color: #982030;
    box-shadow: 0 4px 12px rgba(221, 191, 195, 1);
    transform: scale(1.05);
}

.step-item.completed .step-circle {
    background-color: #982030;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-label {
    font-size: 14px;
    color: #982030;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-item.active .step-label {
    color: #982030;
    font-weight: 700;
}

.step-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.step-item.active .step-title {
    color: #000;
    font-weight: 600;
}

/* Футер */
.footer {
    margin-top: auto;
    padding: 40px 16px;
    text-align: center;
    background-color: #982030;
    border-radius: 20px 20px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.footer-links a {
    color: white;
    font-size: 14px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-info {
    color: var(--footer-text);
    font-size: 13px;
    line-height: 1.5;
}

.footer-info p {
    margin: 4px 0;
    color: #e2576a;
}

/* Стили для выбора картинки */
.image-presets {
    margin: 10px 0;
}

.preset-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
   
}

.image-option {
    width: 60px;
    height: 60px;
    border: 1px solid black;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.image-option:hover {
    transform: scale(1.05);
    border-color: #982030;
}

.image-option input[type="radio"] {
    display: none;
}

.image-option input[type="radio"]:checked + img {
    border: 2px solid #982030;
}

.image-option img {
    border: 2px solid transparent; 
    width: 100%;
    height: 100%;
    object-fit: cover;

}

/* Картинка в превью */
/*.preview-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    max-height: 350px;
    min-height: 150px;
    background: transparent;
}*/

.preview-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px;
    max-height: 350px;
    animation: slideFromTop 0.6s ease 0.1s both;
}

.preview-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}





.upload-section {
    margin: 10px 0;
    padding: 10px;
    background: #ffcfd5;
    border-radius: 8px;

}

.upload-section label {
    display: block;
    font-weight: 600;
    color: black;
    margin-bottom: 5px;
}

.custom-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.custom-upload input[type="file"] {
    padding: 10px;
    border: 2px dashed black;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 15px;
}

.file-name {
    display: block;
    font-size: 10px;
    color: #313131;
    font-style: italic;
    padding: 1px 0;
}

.upload-hint {
    font-size: 10px;
    color: #313131;
    margin-bottom: 8px;
}












/* Навигационные кнопки */
.form-navigation {
    display: flex;
    justify-content: space-between;
    flex-direction: row; 
    gap: 15px;
    margin-top: 30px;
   
}

.btn-back {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 150px;
    max-width: 160px;
   
    
}

.btn-back:hover {
    background: #e0e0e0;
    transform: translateX(-3px);
}

.btn-cta {
    flex: 1;
    background: #982030;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    border: none;
    box-shadow: 0 2px 8px rgba(221, 191, 195, 1);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
    min-width: 150px;
    max-width: 160px;
    
}

.btn-cta:hover {
    opacity: 0.9;
    transform: translateX(3px);
}

/* Адаптация для мобильных устройств */












@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
       
    }

    .hero-form {
        width: 90%;
        padding-left: 0px;


    }

    .hero-preview {
        width: 300px;
        min-height: 500px;
        margin-top: 20px;
        
    }


    .steps-navigation {
        gap: 20px;
        /*flex-direction: row;*/
        /*align-items: center;*/
    }

    .step-item {
        gap: 5px;
        /*width: 100%;
        max-width: 250px;*/
    }



    .button-styles-section {
        margin: 15px 0 20px;
    }

    .button-styles-section label {
        font-weight: 600;
        color: black;
        display: block;
        margin-bottom: 10px;
        font-size: 15px;
    }

    .button-styles-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
         width: 100%;
    

    }

    /* Стили для кнопок выбора стиля */
    .style-btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 40px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        font-family: inherit;
        border: 2px solid #E8ECEF;
        background: white;
        color: #333;
    }

    .style-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: #D1D9E0;
    }

    .style-btn.active {
        border-color: #982030;
        background: #FFF8F8;
        color: #982030;
        box-shadow: 0 4px 12px rgba(152, 32, 48, 0.15);
    }


























}












@media (max-width: 576px) {
    .form-navigation {
        flex-direction: column;
        align-items: center;

        justify-content: space-between;
        flex-direction: row; 
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .btn-back, .btn-cta {
        width: 100%;
        max-width: 190px;
        transform: none !important;
        
    }

    .btn-back:hover, .btn-cta:hover {
        transform: none !important;
    }

    .button-styles-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        width: 50px;
    
    }
    
    .style-btn {
        padding: 8px 12px;
        font-size: 10px;
        white-space: normal;
        word-break: break-word;
    }

}








/* ===== ВЫБОР ФОНА ===== */
.background-section {
    margin: 5px 0;
}

.background-section label {
    font-weight: 600;
    color: black;
    display: block;
    margin-bottom: 5px;
}

.background-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0px;
}

.background-option {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid black;
    transition: all 0.3s ease;
}

.background-option.selected {
    border: 3px solid #982030;  /* жирная обводка */
    transform: scale(1.02);
}



.background-option input[type="radio"] {
    display: none;
}

.background-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-items {
    color: #999;
    font-style: italic;
}





/* ===== ВЫБОР ШРИФТА ===== */
/* Компактные кнопки выбора шрифта */
.fonts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.font-card {
    padding: 5px 10px;
    background: white;
    border: 1px solid #fbc7cd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;


   
}

.font-card span {
    /* Каждый span будет иметь свой шрифт */
    display: inline-block;
}


/* ===== ШРИФТЫ ДЛЯ КАЖДОЙ КНОПКИ ===== */
.font-card[data-font-family="Playpen Sans"] span { 
    font-family: 'Playpen Sans', cursive; 
}

.font-card[data-font-family="Roboto"] span { 
    font-family: 'Roboto', sans-serif; 
}

.font-card[data-font-family="Pacifico"] span { 
    font-family: 'Pacifico', cursive; 
}

.font-card[data-font-family="Lobster"] span { 
    font-family: 'Lobster', cursive; 
}

.font-card[data-font-family="Playfair Display"] span { 
    font-family: 'Playfair Display', serif; 
}

.font-card[data-font-family="Cormorant Garamond"] span { 
    font-family: 'Cormorant Garamond', serif; 
}

.font-card[data-font-family="Poiret One"] span { 
    font-family: 'Poiret One', cursive; 
}

.font-card[data-font-family="Caveat"] span { 
    font-family: 'Caveat', cursive; 
}

.font-card[data-font-family="Arsenal"] span { 
    font-family: 'Arsenal', sans-serif; 
}

.font-card[data-font-family="Cormorant Infant"] span { 
    font-family: 'Cormorant Infant', serif; 
}



.font-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.font-card.selected {
    border-color: #982030;
    background: #ffe7ea;
}

/* КВАДРАТНЫЕ КНОПКИ ДЛЯ ЦВЕТА */
.colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.color-card {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid black;
}


.color-card.selected {
    
    transform: scale(1.02);

    border: 3px solid #982030;  /* жирная обводка */
   
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #ddd;
}

.color-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.color-hex {
    font-size: 12px;
    font-family: monospace;
    color: #999;
}




.button-styles-section {
    margin: 15px 0 20px;
}

.button-styles-section label {
    font-weight: 600;
    color: black;
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    
}

.button-styles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
     width: 100%;
}

/* Стили для кнопок выбора стиля */
.style-btn {
  /*  flex: 1;
    min-width: 100px;*/
    width: 120px;      /* Фиксированная ширина */
    height: 40px; 
    white-space: nowrap;
    overflow: hidden; 



    padding: 10px 5px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    border: 1px solid #f9bac1;
    background: #ffcfd5;
    color: #333;
}

.style-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #D1D9E0;
}

.style-btn.active {
    border-color: #982030;
    background: #FFF8F8;
    color: #982030;
    box-shadow: 0 4px 12px rgba(152, 32, 48, 0.15);
}


/* Специфические цвета для активного состояния */
.style-btn[data-style="classic"].active {
    border-color: #c02a2a;
    background: #fff0f0;
    color: #c02a2a;
}

.style-btn[data-style="gradient"].active {
    border-color: #8B0000;
    background: linear-gradient(135deg, #fff5f5, #fff0f0);
    color: #8B0000;
}

.style-btn[data-style="minimal"].active {
    border-color: #4CAF50;
    background: #f0fff0;
    color: #4CAF50;
}





/* ========== СТИЛИ ДЛЯ КАЖДОГО ВАРИАНТА (согласованы с общим дизайном) ========== */

/* 1. Классический (как основные кнопки на сайте) */
.style-classic .demo-yes {
    background: #c02a2a;
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(192, 42, 42, 0.3);
}
.style-classic .demo-no {
    background: transparent;
    color: #2C3E2C;
    border: 2px solid #B0BEC5;
}

/* 2. Градиентный (элегантный переход) */
.style-gradient .demo-yes {
    background: linear-gradient(115deg, #c02a2a, #8B1E2A);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(139, 30, 42, 0.25);
}
.style-gradient .demo-no {
    background: linear-gradient(115deg, #5F6A6F, #2C3E50);
    color: white;
    border: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 3. Минималистичный (плоские, но сочные) */
.style-minimal .demo-yes {
    background: #4CAF50;
    color: white;
    border: none;
}
.style-minimal .demo-no {
    background: #F44336;
    color: white;
    border: none;
}

/* 4. Теневой (объемный, как у модальных карточек) */
.style-shadow .demo-yes {
    background: #8BC34A;
    color: #1F3A1F;
    border: none;
    box-shadow: 0 5px 0 #558B2F;
    transform: translateY(-2px);
}
.style-shadow .demo-no {
    background: #ECEFF1;
    color: #455A64;
    border: none;
    box-shadow: 0 5px 0 #B0BEC5;
    transform: translateY(-2px);
}

/* 5. Свечение (акцент с неоном) */
.style-glow .demo-yes {
    background: #982030;
    color: white;
    border: none;
    box-shadow: 0 0 0 2px rgba(152, 32, 48, 0.3), 0 0 0 4px rgba(152, 32, 48, 0.1);
}
.style-glow .demo-no {
    background: #37474F;
    color: #ECEFF1;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Название и описание стиля */
.style-name {
    font-size: 15px;
    font-weight: 700;
    color: #1F2A1E;
    margin-bottom: 6px;
}

.style-desc {
    font-size: 11px;
    color: #7B8A7B;
    line-height: 1.3;
}













/* Запрещаем переключение шрифта до загрузки */
.preview-title,
.preview-text {
    transition: font-family 0.1s ease, color 0.1s ease;
    will-change: font-family, color;
}

/* Системные шрифты как fallback, чтобы не было прыжка */
/*.preview-title,
.preview-text {
    font-family: "Playpen Sans", "Segoe UI", "Arial", sans-serif;
}*/

/*
@font-face {
    font-family: 'Playpen Sans';
    font-display: swap;
}*/



































/* ========== ВЕРХНЕЕ МЕНЮ (скопировано из основного CSS) ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fefcfb;
    padding: 5px 50px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 99;
    flex-wrap: wrap;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 5px;
    object-fit: contain;
}



/* Оверлей для затемнения */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.active {
    display: block;
}

.nav-links {
    display: flex;
    gap: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: black;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-decoration: none;
    font-size: 20px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 540;
}

.nav-links a:hover {
    color: #94162C;
    transform: translateY(-2px);
}

.nav-links a.active {
    color: #94162C;
}

.spacer {
    width: 150px;
}

/* АДАПТИВНОСТЬ ДЛЯ МЕНЮ (только для телефонов) */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 20px;
        width: 100%;
    }
    
    
    
    .nav-links {
        position: static;
        transform: none;
        display: flex !important;
        gap: 10px;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0px;
    }
    
    .nav-links a {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .spacer {
        display: none;
    }
        .footer-links {
   
    gap: 10px;
    
}
}














.custom-upload {
    position: relative;
    display: flex;
    gap: 0px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0px;
}

.loading-text {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #363636;
    font-weight: 400;
}

.loading-label {
    letter-spacing: 0.3px;
}

.loading-dots {
    display: inline-flex;
    gap: 2px;
}

.loading-dots span {
    animation: dotPulse 1.4s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

































































































/* ============================================ */
/* ========== 8. КОЛОНКА ПРЕДПРОСМОТРА ========== */
/* ============================================ */
.payment-preview-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    margin-bottom: 15px;
}

/* ============================================ */
/* ========== 13. ОСНОВНОЙ БЛОК ПРЕВЬЮ (HERO) ========== */
/* ============================================ */
.hero-preview {
    width: 330px;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.1), 0 0 0 8px #333, 0 0 0 10px #555;
    margin: 0 auto;
}




/* ============================================ */
/* ========== 16. КОНТЕЙНЕР КНОПОК ========== */
/* ============================================ */
.hero-preview .buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 5px 0 5px 0;
    animation: slideFromBottom 0.6s ease 0.3s both;
}

/* ============================================ */
/* ========== 17. БАЗОВЫЕ СТИЛИ КНОПОК ========== */
/* ============================================ */
.hero-preview .preview-btn-yes,
.hero-preview .preview-btn-no {
    flex: 1;
    max-width: 120px;
    min-width: 120px;
    padding: 12px 0px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.preview-btn-yes:hover,
.preview-btn-no:hover {
    transform: scale(1.05);
}

/* ============================================ */
/* ========== 26. СТИЛИ ДЛЯ ОТКРЫТКИ ВНУТРИ HERO-PREVIEW ========== */
/* ============================================ */
.hero-preview.postcard-container {
    overflow: hidden;
    position: relative;
}

/* ============================================ */
/* ========== 27. СТИЛИ ДЛЯ РЕАКЦИЙ ========== */
/* ============================================ */
.hero-preview .reaction-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
}

.hero-preview .main-content-wrapper,
.hero-preview .reaction-wrapper {
    height: auto;
    width: 300px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    padding: 25px 10px 12px 10px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    animation: containerFadeIn 0.8s ease forwards;
    z-index: 2;
}

.hero-preview .reaction-text {
    font-weight: 600;
    font-size: 17px;
    padding: 7px 0px;
    text-align: center;
    max-width: 260px;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin: 0px;
    line-height: 1.5;
    background: transparent;
}

/* ============================================ */
/* ========== 28. ОБЕРТКА HERO-BAG ========== */
/* ============================================ */
.hero-bag {
    background: white;
    border-radius: 40px;
    flex-direction: column;
    justify-content: space-between;
    display: flex;
    width: 330px;
    min-height: 600px;
    z-index: 1;
    position: relative;
}

/* ============================================ */
/* ========== 29. КОНТЕЙНЕР ИЗОБРАЖЕНИЙ В HERO ========== */
/* ============================================ */
.hero-preview .image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px;
    max-height: 350px;
    animation: slideFromTop 0.6s ease 0.1s both;
}

.reaction-content .image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    max-height: 350px;
    animation: slideFromTop 0.6s ease 0.1s both;
}

.hero-preview .content-image {
    max-width: 95%;
    max-height: 250px;
    min-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}












/* ============================================ */
/* ========== 30. ЗАГОЛОВОК И ТЕКСТ В HERO ========== */
/* ============================================ */
.hero-preview .postcard-title {
    font-size: 22px;
    text-align: center;
    word-break: break-word;
    font-weight: bold;
    margin: 0px 0 5px 0;
    padding: 5px 8px 5px 8px;
    max-width: 300px;
    animation: slideFromTop 0.6s ease forwards;
}

.hero-preview .postcard-text {
    font-size: 18px;
    text-align: center;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.4;
    margin: 5px 0 5px 0;
    padding: 0px 8px 8px 8px;
    max-width: 300px;
    width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
    animation: slideFromBottom 0.6s ease 0.2s both;
}

/* ============================================ */
/* ========== 18. АДАПТАЦИЯ ДЕСКТОП ========== */
/* ============================================ */


/* ============================================ */
/* ========== 19. АДАПТАЦИЯ МОБИЛЬНЫЕ ========== */
/* ============================================ */
@media (max-width: 768px) {
    .payment-main-container {
        flex-direction: column;
    }

    

    .hero-bag {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* ============================================ */
/* ========== 37. АНИМАЦИИ ДЛЯ ОТКРЫТКИ ========== */
/* ============================================ */









/* Анимация появления контейнера */
@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Анимация появления сверху */
@keyframes slideFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация появления снизу */
@keyframes slideFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация исчезновения вверх */
@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100px);
    }
}

/* Анимация исчезновения вниз */
@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100px);
    }
}

/* Классы для использования анимаций */
.slide-out-up {
    animation: slideOutUp 0.4s ease forwards;
}

.slide-out-down {
    animation: slideOutDown 0.4s ease forwards;
}

.slide-from-top {
    animation: slideFromTop 0.5s ease forwards;
}

.slide-from-bottom {
    animation: slideFromBottom 0.5s ease forwards;
}

.hero-preview {
    container-type: inline-size;
}

/* ============================================ */
/* ========== 38. КНОПКА ПЕРЕЗАГРУЗКИ ========== */
/* ============================================ */
.reload-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reload-btn:hover {
    transform: rotate(90deg);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reload-btn svg {
    color: #982030;
    width: 20px;
    height: 20px;
}

/* ============================================ */
/* ========== 39. АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */
/* ============================================ */
@media (max-width: 768px) {
    .reload-btn {
        width: 35px;
        height: 35px;
        top: 15px;
        left: 15px;
    }

    .reload-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .reload-btn {
        width: 30px;
        height: 30px;
        top: 10px;
        left: 10px;
    }

    .reload-btn svg {
        width: 16px;
        height: 16px;
    }
}




.image-option.selected img {
    border: 2px solid #982030;
    border-radius: 8px;
}