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

body {
    background: #000000;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

#text-display {
    font-size: 80px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    white-space: pre-line;
    line-height: 1.4;
    opacity: 0;
    transform: scale(0.5);
    transition: all 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#text-display.show {
    opacity: 1;
    transform: scale(1);
}

#text-display.zoom-in {
    animation: zoomIn 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#text-display.zoom-out {
    animation: zoomOut 2s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.image-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.fade-image {
    position: absolute;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.8);
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) contrast(1.1);
}

.fade-image.show {
    opacity: 1;
    transform: scale(1);
}

.fade-image.zoom-out {
    animation: imageZoomOut 2.5s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes imageZoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(0.9) contrast(1.1);
    }
    50% {
        opacity: 0.6;
        filter: brightness(0.7) contrast(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
        filter: brightness(0.5) contrast(1.3);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #text-display {
        font-size: 40px;
        padding: 0 20px;
    }

    .fade-image {
        max-width: 90%;
        max-height: 70%;
    }
}

@media (max-width: 480px) {
    #text-display {
        font-size: 28px;
        padding: 0 15px;
    }

    .fade-image {
        max-width: 95%;
        max-height: 60%;
    }
}

/* 添加文字渐变效果 */
.gradient-text {
    background: linear-gradient(45deg, #ffffff, #cccccc, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 点击特效 */
.click-effect {
    position: fixed;
    pointer-events: none;
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                 0 0 20px rgba(255, 255, 255, 0.6),
                 0 0 30px rgba(255, 255, 255, 0.4);
    z-index: 9999;
    animation: clickBurst 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    user-select: none;
}

@keyframes clickBurst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
}

/* 额外的爆炸粒子效果 */
.particle {
    position: fixed;
    pointer-events: none;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    z-index: 9999;
    animation: particleFloat 1s ease-out forwards;
    user-select: none;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.3);
    }
}

/* 叠加文字样式 */
.overlay-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                 0 0 40px rgba(255, 255, 255, 0.6),
                 0 0 60px rgba(255, 255, 255, 0.4);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 8px;
}

.overlay-text.show {
    animation: textFlyIn 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.overlay-text.hide {
    animation: textFlyOut 2s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes textFlyIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-100px) scale(0.5);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(1);
        filter: blur(0px);
    }
}

@keyframes textFlyOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(1);
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        filter: blur(5px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(100px) scale(0.5);
        filter: blur(10px);
    }
}

/* 文字闪烁发光效果 */
.overlay-text.glow {
    animation: textGlow 0.5s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                     0 0 40px rgba(255, 255, 255, 0.6),
                     0 0 60px rgba(255, 255, 255, 0.4);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 1),
                     0 0 60px rgba(255, 255, 255, 0.8),
                     0 0 90px rgba(255, 255, 255, 0.6);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .overlay-text {
        font-size: 48px;
        letter-spacing: 4px;
    }
}

@media (max-width: 480px) {
    .overlay-text {
        font-size: 32px;
        letter-spacing: 2px;
    }
}
