* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background-color: #fef9f3;
    color: #5a4d41;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Базовые стили конверта */
.envelope-container {
    position: relative;
    width: 300px;
    height: 200px;
    cursor: pointer;
    margin-bottom: 30px;
    z-index: 10;
    transition: all 0.5s ease;
    animation: gentle-shake 4s ease-in-out infinite;
}

.envelope {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #e8d0b3;
    border-radius: 8px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.5s ease;
}

.envelope:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #d4b896 0%, #e8d0b3 100%);
    border-radius: 8px;
    z-index: 1;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid #d4b896;
    transform-origin: top;
    transition: transform 0.8s ease;
    z-index: 2;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #e8d0b3;
    border-radius: 0 0 8px 8px;
    z-index: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Анимация дрожания */
@keyframes gentle-shake {
    0%, 100% { 
        transform: translateX(0) rotate(0deg); 
    }
    25% { 
        transform: translateX(-2px) rotate(-0.5deg); 
    }
    50% { 
        transform: translateX(2px) rotate(0.5deg); 
    }
    75% { 
        transform: translateX(-1px) rotate(-0.3deg); 
    }
}

.envelope-container:hover {
    animation: none;
    transform: scale(1.05);
}

/* Сургучная печать */

.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    z-index: 4;
    animation: seal-glow 3s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.8s ease;
    pointer-events: none;
}

.wax-seal object {
    width: 100%;
    height: 100%;
    filter: 
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 8px rgba(188, 74, 60, 0.2));
}

/* Анимация свечения */
@keyframes seal-glow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 5px rgba(188, 74, 60, 0.4));
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.05);
        filter: drop-shadow(0 0 12px rgba(188, 74, 60, 0.6));
    }
}

/* Анимация при открытии */
.envelope-container.open {
    animation: none;
}

.envelope-container.open .envelope-flap {
    transform: rotateX(180deg);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.envelope-container.open .envelope {
    transform: translateY(-20px);
    opacity: 0.7;
    transition: all 0.8s ease;
}

/* Анимация при открытии */
.envelope-container.open .wax-seal {
    animation: seal-break 0.8s ease-out forwards;
    transform: translate(-50%, -50%) scale(1.1);
}
@keyframes seal-break {
    0% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(188, 74, 60, 0.6));
    }
    /* Задерживаем начало анимации чтобы совпало с открытием клапана */
    30% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    60% { 
        transform: translate(-50%, -120%) scale(1.2) rotate(8deg);
        opacity: 0.7;
        filter: drop-shadow(0 0 12px rgba(188, 74, 60, 0.8));
    }
    100% { 
        transform: translate(-50%, -180%) scale(0) rotate(15deg);
        opacity: 0;
        filter: drop-shadow(0 0 0 rgba(188, 74, 60, 0));
    }
}


.envelope-container.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    top: -9999px;
    left: -9999px;
    margin: 0;
    height: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .envelope-container {
        width: 250px;
        height: 170px;
    }
    
    .envelope-flap {
        border-left: 125px solid transparent;
        border-right: 125px solid transparent;
        border-top: 85px solid #d4b896;
    }
    
    .wax-seal {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .envelope-container {
        width: 220px;
        height: 150px;
    }
    
    .envelope-flap {
        border-left: 110px solid transparent;
        border-right: 110px solid transparent;
        border-top: 75px solid #d4b896;
    }
    
    .wax-seal {
        width: 45px;
        height: 45px;
    }
}

/* Убираем старые ненужные стили сургуча */
.wax, .wax-shine {
    display: none;
}

/* Обертка для видео с центрированием */
/* Текстовый контент */
.video-wrapper {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

/* Контейнер видео */
.video-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Само видео */
video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    display: block;
}

/* Контент после открытия */
.content {
    display: none;
    width: 100%;
    gap: 40px;
    align-items: flex-start; /* Выравниваем по верху */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    min-height: 70vh;
    padding: 20px 0;
}

.content.active {
    display: flex;
    opacity: 1;
}

/* Текстовый контент */
.text-content {
    flex: 0 0 500px; /* Фиксированная ширина */
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0;
}
/* Улучшаем читаемость на всех устройствах */
.text-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #8b6b4d;
    text-align: center;
    line-height: 1.3;
    transition: font-size 0.3s ease;
}

.name-line-1 {
    font-size: 32px;
    margin-bottom: 5px;
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    color: #8b6b4d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.name-line-2 {
    font-size: 32px;
    font-weight: 400;
    font-family: "Great Vibes", cursive;
    color: #8b6b4d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.text-content h2 {
    font-size: 32px;
    font-weight: 400;
    font-family: "Great Vibes", cursive;
    margin: 25px 0 15px;
    color: #8b6b4d;
    border-bottom: 1px solid #e8d0b3;
    padding-bottom: 5px;
    transition: font-size 0.3s ease;
    text-align: center;
}

.text-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    transition: font-size 0.3s ease;
}

.details p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.details i {
    margin-right: 10px;
    color: #8b6b4d;
    width: 20px;
    text-align: center;
    transition: font-size 0.3s ease;
}

.guest-name {
    font-size: 28px;
    color: #8b6b4d;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

/* Стили для страницы 404 */
.error-page {
    text-align: center;
    display: none;
}

.error-page.active {
    display: block;
}

.error-code {
    font-size: 120px;
    color: #e8d0b3;
    margin-bottom: 20px;
    font-weight: bold;
}

.error-message {
    font-size: 24px;
    margin-bottom: 30px;
    color: #8b6b4d;
}

.error-description {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 500px;
}

.contact-info {
    margin-top: 30px;
    padding: 20px;
    background: rgba(232, 208, 179, 0.2);
    border-radius: 10px;
    display: inline-block;
}

/* Стили для тестовых ссылок */
.test-links {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    border: 2px solid #e8d0b3;
    display: none;
}

.test-links h3 {
    margin-bottom: 10px;
    color: #8b6b4d;
}

.test-links a {
    display: block;
    margin: 5px 0;
    color: #5a4d41;
    text-decoration: none;
    padding: 5px;
    border-radius: 3px;
}

.test-links a:hover {
    background: #f5e9d9;
}
.error-page.active ~ #mainContent,
.error-page.active ~ .test-links {
    display: none !important;
}
/* Стили для палитры мазков кисти */
/* Стили для фактурных мазков кисти */
/* Стили для цветовой палитры дресс-кода */
.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.color-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Конкретные цвета палитры */
.color-pastel-pink { background-color: #f8c8dc; }
.color-pastel-lavender { background-color: #d8bfd8; }
.color-pastel-mint { background-color: #b5e7d7; }
.color-pastel-peach { background-color: #ffdab9; }
.color-pastel-lilac { background-color: #e6e6fa; }
/* Стили для календаря */
/* Стили для календаря на всю ширину */
.calendar-container {
    width: 100%;
    margin: 20px 0;
}

.calendar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    width: 100%;
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    color: #8b6b4d;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 20px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    font-size: 14px;
    padding: 0 20px;
    font-family: "Montserrat", sans-serif;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: #8b6b4d;
    padding: 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.day {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #5a4d41;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.day:hover:not(.wedding-day):not(.empty) {
    background: rgba(232, 208, 179, 0.3);
    transform: translateY(-2px);
}

.day.empty {
    visibility: hidden;
    background: transparent;
}

/* Стили для дня свадьбы */


.date-number {
    position: relative;
    z-index: 3;
}

.heart-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b6b4d, #836040);
}

.wedding-day {
    font-weight: 700;
}

.wedding-day .date-number {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        text-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }
    50% { 
        transform: scale(1.1); 
        text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }
}

.wedding-time {
    text-align: center;
    margin-top: 25px;
    font-size: 18px;
    color: #8b6b4d;
    font-weight: 600;
    padding: 0 20px;
}
/* Стили для заголовка даты */
.wedding-date-header {
    text-align: center;
    margin-bottom: 0px;
    padding: 0 20px;
    font-family: "Montserrat", sans-serif;
}

.date-main {
    font-size: 28px;
    font-weight: 400;
    color: #8b6b4d;
    margin-bottom: 8px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    letter-spacing: 1px;
}
/* Стили для карточки места проведения */
/* Стили для карточки места проведения */
.venue-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%; /* Ограничиваем высоту фона */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 150" preserveAspectRatio="none"><path d="M0,0 Q200,30 400,0 L400,150 Q200,120 0,150 Z" fill="%23e8d0b3" opacity="0.3"/><path d="M0,30 Q100,0 200,30 T400,30 L400,150 Q200,180 0,150 Z" fill="%23d4b896" opacity="0.2"/></svg>');
    background-size: cover;
    background-position: top center; /* Выравниваем по верху */
    background-repeat: no-repeat;
    opacity: 0.6;
}

.venue-card {
    position: relative;
    margin: 20px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-height: 180px; /* Уменьшаем минимальную высоту */
    background: linear-gradient(135deg, #fef9f3 0%, #f5f0e4 100%);
}

.venue-content {
    position: relative;
    z-index: 2;
    padding: 25px 20px 20px; /* Уменьшаем отступы, особенно снизу */
    text-align: center;
    color: #5a4d41;
}

.venue-text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    text-align: center; /* Явно указываем выравнивание */
}

.venue-text strong {
    color: #8b6b4d;
    font-weight: 600;
}

.venue-address {
    font-size: 18px;
    font-weight: 600;
    color: #8b6b4d;
    margin-bottom: 20px;
    font-family: "Montserrat", sans-serif;
    text-align: center; /* Явное выравнивание по центру */
    display: block; /* Блочный элемент */
    width: 100%;
}

/* Стили для кнопки карты */
.map-button {
    background: linear-gradient(135deg, #8b6b4d 0%, #6d4c41 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 107, 77, 0.3);
    display: inline-flex; /* Кнопка по центру через inline-flex */
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}


/* Адаптивность */
@media (max-width: 768px) {
    .venue-card {
        margin: 15px 0;
        border-radius: 15px;
    }
    
    .venue-content {
        padding: 35px 20px;
    }
    
    .venue-text {
        font-size: 15px;
    }
    
    .venue-address {
        font-size: 16px;
    }
    
    .map-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
}

@media (max-width: 480px) {
    .venue-card {
        margin: 12px 0;
        border-radius: 12px;
    }
    
    .venue-content {
        padding: 35px 15px;
    }
    
    .venue-text {
        font-size: 14px;
    }
    
    .venue-address {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    .map-button {
        padding: 8px 18px;
        font-size: 13px;
    }
    
}
/* Стили для тайминга */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e8d0b3, #d4b896);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-time {
    min-width: 80px;
    font-size: 16px;
    font-weight: 600;
    color: #8b6b4d;
    font-family: "Montserrat", sans-serif;
    background: #fef9f3;
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #e8d0b3;
    text-align: center;
    margin-right: 20px;
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #e8d0b3;
}

.timeline-title {
    font-size: 18px;
    font-weight: 700;
    color: #8b6b4d;
    margin-bottom: 8px;
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-description {
    font-size: 14px;
    line-height: 1.5;
    color: #5a4d41;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
}



/* Анимация при наведении */
.timeline-item:hover .timeline-content {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.timeline-item:hover .timeline-time {
    background: #e8d0b3;
    color: #5a4d41;
}

.timeline-item:hover::before {
    background: #ff8e8e;
    transform: scale(1.2);
}

.timeline-content,
.timeline-time,
.timeline-item::before {
    transition: all 0.3s ease;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .timeline {
        padding: 15px 0;
    }
    
    .timeline::before {
        left: 25px;
    }
    
    .timeline-item {
        margin-bottom: 25px;
    }
    
    .timeline-time {
        min-width: 70px;
        font-size: 14px;
        padding: 6px 10px;
        margin-right: 15px;
    }
    
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-title {
        font-size: 16px;
    }
    
    .timeline-description {
        font-size: 13px;
    }
    
    .timeline-item::before {
        left: 23px;
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .timeline {
        padding: 10px 0;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        margin-bottom: 20px;
        flex-direction: column;
    }
    
    .timeline-time {
        min-width: auto;
        width: 100px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .timeline-item::before {
        left: 18px;
        top: 35px;
    }
}
/* Стили для подписи пары */
#coupleNames {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: 28px;
    color: #8b6b4d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    display: block;
    margin-top: 5px;
}

/* Адаптивность для подписи */
@media (max-width: 768px) {
    #coupleNames {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    #coupleNames {
        font-size: 24px;
    }
}
/* Стили для примеров нарядов */
.dresscode-examples {
    margin: 30px 0;
    width: 100%;
}

.example-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 20px;
}

.photo-item {
    position: relative; /* ЭТО КЛЮЧЕВОЕ! */
    text-align: center;
    max-width: 400px;
    width: 100%;
    margin-bottom: 30px; /* Добавим отступ снизу */
}

.photo-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dresscode-examples {
    margin: 30px 0;
    width: 100%;
}

.example-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* Увеличим расстояние между фото */
    margin-top: 20px;
}

.photo-item {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

/* Контейнер для палитры - ОТДЕЛЬНО от фото */
.palette-container {
    margin-bottom: 15px; /* Расстояние между палитрой и фото */
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Сама палитра */
.photo-item .color-palette {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    display: inline-flex; /* Чтобы палитра была по ширине контента */
}

/* Кружочки */
.photo-item .color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.photo-item .color-circle:hover {
    transform: scale(1.1);
}

/* Контейнер для фото */
.image-container {
    width: 100%;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}