/* Wedding invitation style file */

/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B7B7A;
    --secondary-color: #A69B9A;
    --background-color: #f5f2e8;
    --white: #ffffff;
    --text-light: #C8BFBE;
    --accent-blue: #4A90A4;
    --dark-header: #2c2c2c;
    --shadow-light: rgba(139, 123, 122, 0.1);
    --shadow-medium: rgba(139, 123, 122, 0.15);
    --shadow-heavy: rgba(139, 123, 122, 0.25);
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-color);
    color: var(--primary-color);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main container */
.invitation-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--background-color);
    min-height: 100vh;
    position: relative;
}

/* Language switch button */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px var(--shadow-light);
}

.language-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

/* 主建筑插画区域 */
.main-building {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.building-illustration {
    width: 350px;
    height: 400px;
    margin: 0 auto 40px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 350"><defs><style>.building{fill:none;stroke:%238B7B7A;stroke-width:2;} .text{fill:%238B7B7A;font-family:serif;font-size:14px;text-anchor:middle;}</style></defs><rect x="50" y="80" width="200" height="220" class="building"/><rect x="30" y="100" width="240" height="30" class="building"/><rect x="20" y="130" width="260" height="20" class="building"/><circle cx="80" cy="180" r="15" class="building"/><circle cx="220" cy="180" r="15" class="building"/><rect x="80" y="165" width="15" height="30" class="building"/><rect x="205" y="165" width="15" height="30" class="building"/><rect x="130" y="200" width="40" height="60" class="building"/><circle cx="150" cy="140" r="12" class="building"/><text x="150" y="115" class="text">HELLAS HOUSE</text><g class="building"><path d="M40,300 Q80,290 120,295 Q150,300 180,295 Q220,290 260,300"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.couple-figures {
    position: absolute;
    bottom: 15px;
    right: 30px;
    width: 80px;
    height: 50px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><g fill="none" stroke="%238B7B7A" stroke-width="1.5"><circle cx="20" cy="8" r="3"/><circle cx="40" cy="8" r="3"/><path d="M20,12 L20,28 M16,18 L24,18 M20,28 L16,35 M20,28 L24,35"/><path d="M40,12 L40,25 M40,25 L35,32 M40,25 L45,32"/><path d="M38,15 Q42,15 42,20 Q42,25 38,25"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.couple-names {
    font-size: 28px;
    margin: 30px 0 15px;
    color: var(--primary-color);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.wedding-date {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 400;
}

.welcome-text {
    font-size: 16px;
    color: var(--secondary-color);
    font-style: italic;
    margin-top: 5px;
}

/* 功能按钮网格 */
.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.function-card {
    background: var(--white);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-light);
    border: 1px solid rgba(139, 123, 122, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-medium);
}

.function-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* 功能图标 */
.function-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.function-card:hover .function-icon {
    transform: scale(1.1);
}

.schedule-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M8,12 L32,12 M8,18 L28,18 M8,24 L24,24" stroke="%238B7B7A" stroke-width="2" fill="none"/><circle cx="20" cy="20" r="18" stroke="%238B7B7A" stroke-width="2" fill="none"/></svg>');
}

.restaurant-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M20,5 L20,35 M15,10 L25,10 M12,15 L28,15 M10,20 L30,20" stroke="%238B7B7A" stroke-width="2" fill="none"/><circle cx="20" cy="25" r="8" stroke="%238B7B7A" stroke-width="2" fill="none"/></svg>');
}

.rsvp-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><rect x="8" y="10" width="24" height="20" rx="2" stroke="%238B7B7A" stroke-width="2" fill="none"/><path d="M8,15 L20,22 L32,15" stroke="%238B7B7A" stroke-width="2" fill="none"/></svg>');
}

.photos-icon {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><rect x="6" y="8" width="28" height="20" rx="2" stroke="%238B7B7A" stroke-width="2" fill="none"/><circle cx="20" cy="18" r="5" stroke="%238B7B7A" stroke-width="2" fill="none"/><circle cx="12" cy="12" r="1.5" fill="%238B7B7A"/></svg>');
}

.function-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.3;
}

.function-subtitle {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 400;
}

.coming-soon {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* 底部电话按钮 */
.call-button {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 6px 25px var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--background-color);
    z-index: 100;
}

.call-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px var(--shadow-heavy);
}

.call-button:active {
    transform: scale(1.05);
}

.call-icon {
    width: 28px;
    height: 28px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.62,10.79a15.91,15.91,0,0,0,6.59,6.59l2.2-2.2a1,1,0,0,1,1-.27,11.21,11.21,0,0,0,3.48.57,1,1,0,0,1,1,1V20a1,1,0,0,1-1,1A17,17,0,0,1,3,4,1,1,0,0,1,4,3H7.5a1,1,0,0,1,1,1,11.21,11.21,0,0,0,.57,3.48,1,1,0,0,1-.27,1Z" fill="%238B7B7A"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* 详情页面样式 */
.detail-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 500;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    overflow-y: auto;
}

.detail-page.show {
    transform: translateX(0);
}

.detail-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 10;
}

.back-btn {
    font-size: 24px;
    cursor: pointer;
    margin-right: 20px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.detail-content {
    padding: 40px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.detail-section {
    margin-bottom: 50px;
}

.detail-section-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    font-weight: 500;
}

.detail-section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    margin: 15px auto;
    border-radius: 1px;
}

/* 分组按钮样式 */
.group-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.group-button {
    flex: 1;
    min-width: 200px;
    background: var(--white);
    border: 2px solid #E0DDD8;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.group-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.group-button.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.group-button.active .group-button-title,
.group-button.active .group-button-desc {
    color: var(--white);
}

.group-button-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.group-button-desc {
    font-size: 14px;
    color: var(--secondary-color);
}

.group-content {
    display: none;
}

.group-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 时间安排样式 */
.schedule-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.schedule-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 25px;
    min-width: 80px;
    line-height: 1.3;
}

.schedule-event {
    flex: 1;
}

.schedule-event-title {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 500;
}

.schedule-event-desc {
    font-size: 14px;
    color: var(--secondary-color);
    line-height: 1.5;
}

/* 地址信息 */
.address-info {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 6px 20px var(--shadow-light);
}

.hotel-name {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.hotel-address {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.map-tip {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* 着装建议 */
.dress-code {
    text-align: center;
}

.dress-code-desc {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 25px;
    line-height: 1.8;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.color-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid var(--background-color);
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: transform 0.2s ease;
}

.color-circle:hover {
    transform: scale(1.1);
}

.dress-suggestions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.dress-item {
    text-align: center;
    font-size: 28px;
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 3px 10px var(--shadow-light);
    transition: transform 0.2s ease;
    line-height: 1.2;
}

.dress-item:hover {
    transform: translateY(-2px);
}

/* 表单样式 */
.rsvp-form {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px var(--shadow-light);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #E0DDD8;
    border-radius: 10px;
    font-size: 16px;
    background: #fafafa;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(139, 123, 122, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: #756965;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

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

/* 加载状态 */
.submit-btn.loading {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

/* 敬请期待样式 */
.coming-soon-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 6px 20px var(--shadow-light);
    margin: 20px 0;
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.coming-soon-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.coming-soon-desc {
    font-size: 16px;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* 桌面端适配 */
@media (min-width: 768px) {
    .invitation-container {
        padding: 0 20px;
    }

    .building-illustration {
        width: 400px;
        height: 450px;
    }

    .couple-names {
        font-size: 32px;
    }

    .wedding-date {
        font-size: 20px;
    }

    .welcome-text {
        font-size: 18px;
    }

    .function-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 60px 40px;
    }

    .function-card {
        padding: 40px 30px;
    }

    .function-title {
        font-size: 20px;
    }

    .function-subtitle {
        font-size: 16px;
    }

    .detail-content {
        padding: 60px 50px;
    }

    .dress-suggestions {
        grid-template-columns: repeat(8, 1fr);
        max-width: 600px;
    }

    .schedule-item {
        padding: 25px 30px;
    }

    .schedule-time {
        font-size: 20px;
        margin-right: 30px;
        min-width: 100px;
    }

    .schedule-event-title {
        font-size: 18px;
    }
}

/* 大屏幕适配 */
@media (min-width: 1200px) {
    .invitation-container {
        max-width: 1000px;
    }

    .function-grid {
        padding: 80px 60px;
        gap: 40px;
    }

    .building-illustration {
        width: 450px;
        height: 500px;
    }

    .couple-names {
        font-size: 36px;
    }

    .function-card {
        padding: 45px 35px;
    }
}

/* 移动端适配 */
@media (max-width: 767px) {
    .language-toggle {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .main-building {
        padding: 40px 15px 30px;
    }

    .building-illustration {
        width: 280px;
        height: 320px;
    }

    .couple-names {
        font-size: 24px;
    }

    .wedding-date {
        font-size: 16px;
    }

    .welcome-text {
        font-size: 14px;
    }

    .function-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 30px 20px;
    }

    .function-card {
        padding: 25px 20px;
    }

    .function-title {
        font-size: 16px;
    }

    .function-subtitle {
        font-size: 13px;
    }

    .call-button {
        bottom: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
    }

    .call-icon {
        width: 24px;
        height: 24px;
    }

    .detail-content {
        padding: 30px 20px;
    }

    .detail-header {
        padding: 15px 20px;
    }

    .back-btn {
        font-size: 20px;
        margin-right: 15px;
    }

    .group-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .group-button {
        min-width: auto;
        width: 100%;
    }

    .schedule-item {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }

    .schedule-time {
        margin-right: 0;
        margin-bottom: 10px;
        min-width: auto;
        font-size: 16px;
    }

    .schedule-event-title {
        font-size: 15px;
    }

    .dress-suggestions {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .dress-item {
        font-size: 20px;
        padding: 10px;
    }

    .color-palette {
        gap: 8px;
    }

    .color-circle {
        width: 30px;
        height: 30px;
    }

    .hotel-name {
        font-size: 20px;
    }

    .hotel-address {
        font-size: 15px;
    }

    .detail-section-title {
        font-size: 18px;
    }

    .rsvp-form {
        padding: 25px 20px;
    }

    .form-input {
        padding: 12px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 15px;
        font-size: 16px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
    .couple-names {
        font-size: 20px;
    }

    .function-card {
        padding: 20px 15px;
    }

    .function-title {
        font-size: 15px;
    }

    .building-illustration {
        width: 240px;
        height: 280px;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.main-building {
    animation: fadeInUp 0.8s ease-out;
}

.function-grid {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.function-card {
    animation: slideInRight 0.6s ease-out both;
}

.function-card:nth-child(1) { animation-delay: 0.1s; }
.function-card:nth-child(2) { animation-delay: 0.2s; }
.function-card:nth-child(3) { animation-delay: 0.3s; }
.function-card:nth-child(4) { animation-delay: 0.4s; }

/* 语言切换动画 */
.language-switching {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
        --background-color: #ffffff;
    }
    
    .function-card {
        border: 2px solid var(--primary-color);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #D4CFC7;
        --secondary-color: #A69B9A;
        --background-color: #2c2c2c;
        --white: #3a3a3a;
        --text-light: #8B7B7A;
    }
    
    body {
        background: var(--background-color);
    }
}