* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #FED4D5;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* Декоративные стикеры по странице */
.page-stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.page-sticker {
    position: absolute;
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
    user-select: none;
    -webkit-user-drag: none;
}

/* Раскладка по странице (подбиралось, чтобы не мешать контенту) */
.page-sticker.s-ball {
    width: 140px;
    top: 6vh;
    left: clamp(24px, 6vw, 96px);
    transform: rotate(-10deg);
}

.page-sticker.s-cake {
    width: 150px;
    top: 18vh;
    right: clamp(24px, 6vw, 96px);
    transform: rotate(8deg);
}

.page-sticker.s-heart {
    width: 140px;
    top: 58vh;
    left: clamp(20px, 5vw, 88px);
    transform: rotate(14deg);
}

.page-sticker.s-butterfly {
    width: 120px;
    top: 84vh;
    right: clamp(18px, 4.5vw, 80px);
    transform: rotate(-8deg);
}

.page-sticker.s-disco {
    width: 140px;
    top: 118vh;
    left: clamp(18px, 4.5vw, 80px);
    transform: rotate(-6deg);
}

.page-sticker.s-snake {
    width: 170px;
    top: 152vh;
    right: clamp(18px, 4.5vw, 80px);
    transform: rotate(6deg);
}

/* Верхняя часть - Оформление дня рождения */
.birthday-header {
    background: transparent;
    padding: 60px 20px;
    text-align: center;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-size: 3.5rem;
    color: #704165;
    text-shadow: none;
    margin-bottom: 18px;
    animation: none;
}

.arina-mobile-sticker {
    display: none;
}

.subtitle {
    font-size: 1.5rem;
    color: #704165;
    text-shadow: none;
    margin-top: 0;
    line-height: 1.3;
}

.subtitle-row {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    align-items: center;
    gap: 16px;
}

.side-sticker {
    width: 140px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.side-sticker.left {
    justify-self: end;
}

.side-sticker.right {
    justify-self: start;
}

/* Приглашение от Арины */
.invitation-text {
    --arina-sticker-size: 140px;
    --arina-sticker-gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    margin: 30px auto;
    max-width: 700px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    text-align: left;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
    position: relative;
}

.arina-invite-sticker {
    position: absolute;
    top: -42px;
    right: calc(-1 * (var(--arina-sticker-size) + var(--arina-sticker-gap)));
    width: var(--arina-sticker-size);
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.invitation-text p {
    margin-bottom: 20px;
}

.invitation-text p:last-child {
    margin-bottom: 0;
}

.greeting {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    margin-bottom: 25px !important;
}

.event-details {
    background: rgba(255, 255, 255, 0.75);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    color: #333;
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.06);
}

.event-details p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.event-details p:last-child {
    margin-bottom: 0;
}

.date-info,
.address-info {
    text-shadow: none;
}

.venue-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.closing {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-top: 30px !important;
}

.signature {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 600;
    color: #764ba2;
    margin-top: 20px !important;
    font-style: italic;
}

/* Ссылки на маркетплейсы */
.marketplace-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.marketplace-links-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.marketplace-link {
    display: inline-block;
    margin: 5px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.marketplace-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.marketplace-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Адаптивность для приглашения */
@media (max-width: 768px) {
    .invitation-text {
        padding: 25px 20px;
        font-size: 1rem;
        margin: 20px 10px;
    }

    /* На мобиле: стикер Арины показываем отдельным блоком между заголовком и приглашением */
    .arina-mobile-sticker {
        display: block;
        width: 92px;
        height: auto;
        margin: 10px auto 16px;
        pointer-events: none;
        user-select: none;
        -webkit-user-drag: none;
    }

    /* А "правый" стикер у белого блока на мобиле скрываем, чтобы ничего не перекрывалось */
    .arina-invite-sticker {
        display: none;
    }
    
    .greeting {
        font-size: 1.3rem;
    }
    
    .event-details {
        padding: 20px 15px;
    }
    
    .event-details p {
        font-size: 1rem;
    }
    
    .closing,
    .signature {
        font-size: 1.1rem;
    }
}

/* Секция с подарками */
.gifts-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Сетка подарков */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .gifts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gift-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gift-item:hover:not(.booked) {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.gift-item.booked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.gift-item.booked::after {
    content: '✓ Забронировано';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 10;
}

.gift-item.booking-pending {
    opacity: 0.75;
    cursor: progress;
}

.gift-item.booking-pending::after {
    content: '⏳ Бронируем...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 10;
}

.gift-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 10px;
}

.gift-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gift-photo--placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: #999;
    background: #f2f2f2;
}

.gift-emoji-large {
    font-size: 8rem;
    z-index: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.gift-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.25;
    min-height: calc(1.2rem * 1.25 * 2); /* 2 строки, чтобы карточки были ровные */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.gift-btn {
    flex: 1 1 0;
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.1;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.gift-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gift-btn--book {
    background: #704165;
    color: #fff;
    box-shadow: 0 6px 14px rgba(112, 65, 101, 0.25);
}

.gift-btn--book:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(112, 65, 101, 0.32);
}

.gift-btn--view {
    background: rgba(112, 65, 101, 0.08);
    border: 1px solid rgba(112, 65, 101, 0.22);
    color: #704165;
}

.gift-btn--view:hover:not(:disabled) {
    background: rgba(112, 65, 101, 0.14);
}


/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
}

.selected-gift-preview {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-image {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 10px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: #ffffff;
    padding: 10px;
}

.preview-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.selected-gift-preview h3 {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.25;
    min-height: calc(1.2rem * 1.25 * 2); /* 2 строки, чтобы блок не прыгал */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.selected-gift-preview p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Уведомление */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 2000;
    animation: slideInRight 0.3s;
}

.notification.show {
    display: block;
}

/* Анимации (оставляем только функциональные для модалки/уведомлений) */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .invitation-text {
        --arina-sticker-size: 92px; /* как у .side-sticker на мобиле */
        --arina-sticker-gap: 10px;
    }

    .arina-invite-sticker {
        top: -28px;
    }

    .subtitle-row {
        grid-template-columns: 92px 1fr 92px;
        gap: 10px;
        margin-top: 22px;
    }

    .side-sticker {
        width: 92px;
    }

    /* На мобиле оставляем минимум декора, чтобы не было визуального шума */
    .page-sticker.s-disco,
    .page-sticker.s-snake,
    .page-sticker.s-heart,
    .page-sticker.s-butterfly {
        display: none;
    }

    .page-sticker.s-ball {
        width: 92px;
        left: 10px;
        top: 4vh;
        opacity: 0.9;
    }

    .page-sticker.s-cake {
        width: 92px;
        right: 10px;
        top: 16vh;
        opacity: 0.9;
    }
    
    .gifts-section {
        padding: 40px 12px;
    }

    .gifts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gift-item {
        padding: 12px;
    }

    .gift-actions {
        flex-direction: column;
    }

    .gift-image {
        /* на мобиле делаем фото крупнее: убираем внутренние поля и не режем по высоте */
        padding: 0;
        border-radius: 12px;
        aspect-ratio: 3 / 4;
        height: auto;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

