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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Верхняя часть - Оформление дня рождения */
.birthday-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.main-title {
    font-size: 3.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.name-title {
    font-size: 4rem;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 3px;
}

.decorations {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.emoji {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.emoji:nth-child(1) { --i: 0; }
.emoji:nth-child(2) { --i: 1; }
.emoji:nth-child(3) { --i: 2; }
.emoji:nth-child(4) { --i: 3; }
.emoji:nth-child(5) { --i: 4; }

.subtitle {
    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
}

/* Приглашение от Арины */
.invitation-text {
    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;
}

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

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

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

.event-details {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    color: white;
    text-align: center;
}

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

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

.date-info,
.address-info {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.address-placeholder {
    font-style: italic;
    opacity: 0.9;
    text-decoration: underline;
    cursor: help;
}

.closing {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f5576c;
    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;
    }
    
    .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;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Карусель */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.carousel-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    touch-action: pan-y;
}

.carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    padding: 20px 0;
    touch-action: pan-y;
}

.gift-item {
    min-width: 250px;
    max-width: 250px;
    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;
}

.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%;
    height: 200px;
    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);
}

.gift-emoji {
    font-size: 5rem;
    z-index: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.gift-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}


.carousel-btn {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: #667eea;
    font-weight: bold;
}

.carousel-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Модальное окно */
.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;
}

.preview-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    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);
}

.selected-gift-preview img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.selected-gift-preview h3 {
    color: #333;
    margin-bottom: 10px;
}

.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 bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@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;
    }
    
    .name-title {
        font-size: 2.5rem;
    }
    
    .gifts-section {
        padding: 40px 12px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }

    .carousel-container {
        position: relative;
        gap: 0;
    }

    /* На мобиле кнопки не должны "съедать" ширину карусели */
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }

    .prev-btn {
        left: 8px;
    }

    .next-btn {
        right: 8px;
    }

    .carousel-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 0 56px; /* место под кнопки по бокам */
    }

    .carousel {
        gap: 12px;
        padding: 12px 0;
    }

    /* 1 карточка на экран */
    .gift-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 16px;
    }

    .gift-image {
        height: 170px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

