* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 倒计时样式 */
.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    z-index: 10;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* 倒计时标签样式 */
.countdown-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    z-index: 11;
    white-space: nowrap;
}

/* 天数单位样式 */
.time-item .unit {
    font-size: 2rem;
    margin-left: 8px;
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.8);
}

/* 时间格式容器 */
.time-format {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 时分秒显示格式 */
.hms-format {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 分秒毫秒显示格式 */
.ms-format {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 毫秒显示特殊样式 */
#milliseconds {
    font-size: 2.5rem;
    color: #ff6b6b;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.8);
}

/* 天数显示样式 */
.days-display {
    font-size: 5rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

/* 春节快乐文字样式 */
.spring-festival {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    font-weight: 900;
    color: #ffeb3b;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #ffeb3b,
        0 0 35px #ffeb3b,
        0 0 40px #ffeb3b,
        0 0 50px #ffeb3b,
        0 0 75px #ffeb3b;
    z-index: 15;
    opacity: 0;
    animation: 
        spring-festival-show 0.8s ease-out forwards,
        spring-festival-pulse 2s ease-in-out infinite;
    font-family: 'Microsoft YaHei', 'SimHei', 'Arial Black', sans-serif;
    pointer-events: none;
    display: none; /* 初始隐藏 */
    letter-spacing: 10px;
    white-space: nowrap;
    text-align: center;
}

@keyframes spring-festival-show {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-5deg);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* 持续脉动动画 */
@keyframes spring-festival-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #fff,
            0 0 20px #ffeb3b,
            0 0 35px #ffeb3b,
            0 0 40px #ffeb3b,
            0 0 50px #ffeb3b,
            0 0 75px #ffeb3b;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05) rotate(1deg);
        text-shadow: 
            0 0 8px #fff,
            0 0 15px #fff,
            0 0 20px #fff,
            0 0 30px #ffeb3b,
            0 0 45px #ffeb3b,
            0 0 50px #ffeb3b,
            0 0 60px #ffeb3b,
            0 0 85px #ffeb3b;
    }
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .spring-festival {
        font-size: 8rem;
        letter-spacing: 8px;
    }
}

@media (max-width: 900px) {
    .spring-festival {
        font-size: 6rem;
        letter-spacing: 6px;
    }
}

@media (max-width: 600px) {
    .spring-festival {
        font-size: 4rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 400px) {
    .spring-festival {
        font-size: 3rem;
        letter-spacing: 2px;
    }
}

.time-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.time-item span:first-child {
    font-size: 5rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

.separator {
    font-size: 5rem;
    color: #fff;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
    }
}

/* 烟花样式 */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 弹幕容器 */
.danmaku-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
    padding: 20px;
}

/* 弹幕气泡样式 - 动漫风格 */
.danmaku-item {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 14px;
    white-space: nowrap;
    animation: danmaku-fade 6s ease-in-out forwards;
    z-index: 5;
    max-width: 350px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.danmaku-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: url('https://via.placeholder.com/40') no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.danmaku-item.text {
    padding-left: 50px;
}

.danmaku-item.image {
    padding: 8px;
    border-radius: 15px;
}

.danmaku-item.video {
    padding: 8px;
    border-radius: 15px;
}

.danmaku-item img {
    max-width: 250px;
    max-height: 180px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.danmaku-item video {
    max-width: 300px;
    max-height: 220px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 弹幕悬停效果 */
.danmaku-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px) scale(1.05);
    animation-play-state: paused; /* 暂停消失动画 */
    z-index: 10;
}

.danmaku-item:hover img,
.danmaku-item:hover video {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

@keyframes danmaku-fade {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }
    10% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
}

/* 预览模态框样式 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.preview-modal.active {
    display: flex;
}

.preview-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: preview-show 0.3s ease;
}

.preview-content img,
.preview-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 15px;
    display: block;
}

.preview-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 107, 0.8);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 101;
}

.preview-close:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.5);
}

@keyframes preview-show {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 发送区域样式 - 参考设计 */
.send-area {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 12px;
}

.send-area:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* 上传按钮样式 */
.upload-btn {
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    gap: 5px;
    border-radius: 8px;
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

/* 输入框样式 */
.message-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 15px;
    padding: 12px 20px;
    height: 45px;
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.5px;
    font-family: 'Microsoft YaHei', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.message-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 107, 0.5);
}

/* 发送按钮样式 - 红色圆形 */
.send-btn {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    position: relative;
    overflow: hidden;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
    background: linear-gradient(135deg, #ff3742, #ff2d3f);
}

.send-btn:active {
    transform: scale(0.95);
}

/* 优化图标间距 */
.camera-btn::before,
.image-btn::before {
    display: none;
}

/* 预览区域样式 */
.preview-container {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    z-index: 10;
}

/* 预览项样式 */
.preview {
    position: relative;
    margin: 0;
    display: none;
}

.preview.show {
    display: block;
}

/* 预览项内容样式 */
.preview img,
.preview video {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

.preview:hover img,
.preview:hover video {
    transform: scale(1.05);
    border-color: rgba(255, 107, 107, 0.6);
}

/* 预览项关闭按钮 */
.preview .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(255, 80, 80, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.preview .remove-btn:hover {
    background: rgba(255, 50, 50, 1);
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(255, 0, 0, 0.6);
}

/* 在线人数样式 */
.online-count {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #48dbfb;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    z-index: 20;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(72, 219, 251, 0.3);
    box-shadow: 0 4px 15px rgba(72, 219, 251, 0.2);
    animation: online-glow 2s ease-in-out infinite alternate;
}

@keyframes online-glow {
    from {
        box-shadow: 0 4px 15px rgba(72, 219, 251, 0.2);
    }
    to {
        box-shadow: 0 4px 25px rgba(72, 219, 251, 0.4);
    }
}

.online-count #online-number {
    color: #ffeb3b;
    font-size: 18px;
    margin-left: 5px;
    animation: number-pulse 1.5s ease-in-out infinite;
}

@keyframes number-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 预览区域样式 */
.preview-container {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 0 0 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
}

/* 预览项样式 */
.preview {
    position: relative;
    margin: 0;
    display: none;
}

.preview.show {
    display: block;
}

/* 预览项内容样式 */
.preview img,
.preview video {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: block;
}

.preview:hover img,
.preview:hover video {
    transform: scale(1.05);
    border-color: rgba(255, 107, 107, 0.6);
}

/* 预览项关闭按钮 */
.preview .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(255, 80, 80, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.preview .remove-btn:hover {
    background: rgba(255, 50, 50, 1);
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(255, 0, 0, 0.6);
}

.preview .remove-btn:hover {
    background: rgba(255, 50, 50, 1);
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .countdown {
        font-size: 2rem;
    }
    
    .time-item span:first-child {
        font-size: 3rem;
    }
    
    .separator {
        font-size: 3rem;
    }
    
    .send-area {
        width: 95%;
    }
    
    .input-container {
        flex-wrap: wrap;
    }
    
    .file-upload {
        margin: 10px 0;
        width: 100%;
        justify-content: center;
    }
    
    .danmaku-item {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .danmaku-item::before {
        width: 35px;
        height: 35px;
        left: -6px;
    }
    
    .danmaku-item.text {
        padding-left: 45px;
    }
}

@media (max-width: 480px) {
    .countdown {
        font-size: 1.5rem;
    }
    
    .time-item span:first-child {
        font-size: 2.5rem;
    }
    
    .separator {
        font-size: 2.5rem;
    }
    
    .message-input {
        font-size: 14px;
    }
    
    .danmaku-item {
        font-size: 12px;
        max-width: 280px;
    }
    
    .danmaku-item img {
        max-width: 200px;
    }
    
    .danmaku-item video {
        max-width: 200px;
    }
}
