/* ============================================
   邀请函书页打开动画样式
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 50%, #F48FB1 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    perspective: 2000px;
    position: relative;
}

/* 背景图片层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/pages/100day/邀请函.png');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(8px);
    z-index: -1;;
}

/* 顶部按钮容器 */
.top-buttons {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* 返回首页按钮 */
.back-button,
.bubblebox-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    text-decoration: none;
    color: #EC407A;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(236, 64, 122, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.back-button:hover,
.bubblebox-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 64, 122, 0.3);
}

.back-icon,
.bubblebox-icon {
    font-size: 20px;
    font-weight: bold;
}

/* 泡泡树洞按钮特殊样式 */
.bubblebox-button {
    background: linear-gradient(135deg, #EC407A, #F48FB1);
    color: white;
}

.bubblebox-button:hover {
    background: linear-gradient(135deg, #C2185B, #EC407A);
}

/* 书页容器 */
.book-container {
    position: relative;
    width: 1200px;
    height: 870px;
    perspective: 2000px;
    margin: 20px auto;
}

/* 封面 */
.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    cursor: pointer;
    z-index: 10;
}

.book-cover.open {
    transform: rotateY(-180deg);
    opacity: 0;
    pointer-events: none;
}

.book-cover .cover-front,
.book-cover .cover-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.book-cover .cover-front {
    background: linear-gradient(135deg, #EC407A 0%, #C2185B 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    gap: 40px;
    padding: 40px;
}

.book-cover .cover-back {
    background: #fff;
    transform: rotateY(180deg);
    z-index: 1;
}

/* 封面左侧图片 */
.cover-left-image {
    flex-shrink: 0;
    width: 360px;
    height: 640px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.cover-left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 封面右侧内容 */
.cover-right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 封面文字 */
.cover-title {
    font-size: 108px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    letter-spacing: 12px;
}

.cover-subtitle {
    font-size: 44px;
    opacity: 0.9;
    margin-bottom: 50px;
    letter-spacing: 6px;
}

.cover-date {
    padding: 28px 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 40px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.cover-hint {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes coverPulse {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    }
}

/* 内页 */
.book-inner {
    display: flex;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease 0.5s;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.book-inner.visible {
    opacity: 1;
    transform: scale(1);
}

.inner-left,
.inner-right {
    flex: 0 0 50%;
    width: 50%;
    position: relative;
    background: #fff;
    overflow: hidden;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inner-left {
    border-right: 2px solid #f0f0f0;
    border-radius: 8px 0 0 8px;
}

.inner-right {
    border-radius: 0 8px 8px 0;
}

.page-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-number {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

/* 内页右侧内容 */
.inner-content {
    height: 100%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff 0%, #FCE4EC 100%);
}

.inner-content h2 {
    font-size: 36px;
    color: #EC407A;
    margin-bottom: 30px;
    font-weight: bold;
    text-align: center;
}

.invite-text {
    font-size: 18px;
    line-height: 1.8;
    color: #424242;
    text-align: center;
    margin-bottom: 40px;
}

.signature {
    margin-top: auto;
    padding-top: 30px;
    border-top: 2px solid #F48FB1;
    width: 100%;
    text-align: center;
}

.signature p {
    font-size: 24px;
    color: #EC407A;
    font-weight: bold;
}

/* 活动信息 */
.event-info {
    margin-top: 40px;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(236, 64, 122, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.event-info h3 {
    font-size: 24px;
    color: #EC407A;
    margin-bottom: 20px;
    font-weight: bold;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #424242;
}

.info-icon {
    font-size: 24px;
}

.event-button {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #EC407A, #C2185B);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(236, 64, 122, 0.3);
    transition: all 0.3s ease;
}

.event-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 64, 122, 0.4);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .book-container {
        width: 800px;
        height: 500px;
    }

    .cover-left-image {
        width: 170px;
        height: 303px;
    }

    .cover-title {
        font-size: 46px;
    }
}

@media (max-width: 1024px) {
    .book-container {
        width: 700px;
        height: 440px;
    }

    .cover-left-image {
        width: 150px;
        height: 267px;
    }

    .cover-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .book-container {
        width: 600px;
        height: 380px;
    }

    .cover-left-image {
        width: 120px;
        height: 213px;
    }

    .cover-title {
        font-size: 32px;
    }

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

@media (max-width: 480px) {
    .book-container {
        width: 100vw;
        height: 320px;
        margin: 10px auto;
    }

    .cover-left-image {
        width: 100px;
        height: 178px;
    }

    .cover-title {
        font-size: 26px;
    }

    .cover-subtitle {
        font-size: 14px;
    }

    .cover-date {
        font-size: 14px;
        padding: 8px 16px;
    }

    .top-buttons {
        top: 10px;
        left: 10px;
        right: 10px;
        gap: 8px;
    }

    .back-button,
    .bubblebox-button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .back-icon,
    .bubblebox-icon {
        font-size: 16px;
    }
}
