/* 展示版本样式 - 只读模式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* 公告样式 - 弹窗模式 */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .announcement-banner {
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 15px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    .announcement-content {
        max-width: 90% !important;
        margin: 0 auto !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    .announcement-title {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }
    
    .announcement-text {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .announcement-banner {
        padding: 15px 10px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .announcement-content {
        max-width: 95% !important;
        max-height: 85vh !important;
    }
    
    .announcement-title {
        font-size: 1.1rem !important;
    }
    
    .announcement-text {
        font-size: 0.85rem !important;
    }
}

.announcement-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

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

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

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

.announcement-content {
    padding: 30px;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.announcement-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    top: 15px;
    right: 15px;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.announcement-body {
    line-height: 1.6;
}

.announcement-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    background-color: transparent !important;
}

.announcement-text h1,
.announcement-text h2,
.announcement-text h3,
.announcement-text h4,
.announcement-text h5,
.announcement-text h6 {
    color: white;
    margin: 10px 0 5px 0;
    background-color: transparent !important;
}

.announcement-text p {
    margin: 8px 0;
    background-color: transparent !important;
}

.announcement-text strong {
    font-weight: 600;
    background-color: transparent !important;
}

.announcement-text em {
    font-style: italic;
    background-color: transparent !important;
}

.announcement-text u {
    text-decoration: underline;
    background-color: transparent !important;
}

.announcement-text span {
    background-color: transparent !important;
}

.announcement-text div {
    background-color: transparent !important;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .announcement-banner {
        padding: 15px;
    }
    
    .announcement-content {
        padding: 20px;
        max-width: 90%;
        border-radius: 12px;
    }
    
    .announcement-title {
        font-size: 18px;
        margin-right: 50px;
    }
    
    .announcement-text {
        font-size: 14px;
    }
    
    .announcement-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .announcement-banner {
        padding: 10px;
    }
    
    .announcement-content {
        padding: 15px;
        max-width: 95%;
        border-radius: 10px;
    }
    
    .announcement-title {
        font-size: 16px;
        margin-right: 45px;
    }
    
    .announcement-text {
        font-size: 13px;
    }
    
    .announcement-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 8px;
        right: 8px;
    }
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    margin: 15px 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 1s ease;
}

.birthday-title h1 {
    font-size: 2.5rem;
    color: #e91e63;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

.birthday-date {
    font-size: 1.8rem;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 5px;
}

.birthday-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* 照片轮播区域 */
.photo-carousel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease 0.3s both;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: #f8f8f8;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    background: white;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.carousel-btn {
    background: rgba(233, 30, 99, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: rgba(233, 30, 99, 1);
    transform: scale(1.1);
}

.carousel-btn.prev {
    margin-left: 15px;
}

.carousel-btn.next {
    margin-right: 15px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(233, 30, 99, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #e91e63;
    transform: scale(1.2);
}

/* 照片信息显示 - 合并到轮播区域 */
.photo-description {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(233, 30, 99, 0.1);
    animation: fadeInUp 1s ease 0.6s both;
}

.photo-description h3 {
    color: #e91e63;
    font-size: 1.4rem;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
}

.photo-description p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 12px;
    min-height: 1.6em;
}

.photo-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.photo-meta:empty {
    display: none;
}

.photo-date {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

.photo-size {
    color: #e91e63;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(233, 30, 99, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
}

/* 文字名片区域 */
.text-cards-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease 0.6s both;
}

.text-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-card-display {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(233, 30, 99, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: fadeInUp 1s ease both;
}

.text-card-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.text-card-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}

/* 统一文字名片中文字背景为透明，避免与卡片底色冲突 */
.text-card-content,
.text-card-content * {
    background: transparent !important;
    background-color: transparent !important;
}

.text-card-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 15px 0;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.text-card-content img:hover {
    transform: scale(1.02);
}

/* 祝福区域 */
.wishes-section {
    animation: fadeInUp 1s ease 0.9s both;
}

.wishes-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wish-card {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.wish-card:nth-child(2) {
    animation-delay: 0.5s;
}

.wish-card:nth-child(3) {
    animation-delay: 1s;
}

.wish-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.wish-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.wish-card p {
    font-size: 1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* 背景特效 - 飘动的心形 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: floatHeart 6s infinite linear;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.heart:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.heart:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 9s;
}

.heart:nth-child(4) {
    left: 40%;
    animation-delay: 3s;
    animation-duration: 6s;
}

.heart:nth-child(5) {
    left: 60%;
    animation-delay: 4s;
    animation-duration: 8s;
}

.heart:nth-child(6) {
    left: 80%;
    animation-delay: 5s;
    animation-duration: 7s;
}

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

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

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

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

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .birthday-title h1 {
        font-size: 2rem;
    }
    
    .birthday-date {
        font-size: 1.5rem;
    }
    
    .carousel-slide img {
        height: 300px;
        max-height: 300px;
    }
    
    .carousel-container {
        height: 300px;
        min-height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carousel-btn.prev {
        margin-left: 10px;
    }
    
    .carousel-btn.next {
        margin-right: 10px;
    }
    
    .photo-description h3 {
        font-size: 1.2rem;
    }
    
    .photo-description p {
        font-size: 0.9rem;
    }
    
    .photo-meta {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .photo-size {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .photo-description {
        padding: 15px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: #e91e63;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e91e63;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
