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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background: #0a0a0a;
    color: #ffffff;
    position: relative;
}

/* 动态渐变背景 */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* 音效开关按钮 */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.sound-toggle:active {
    transform: scale(0.95);
}

.sound-toggle svg {
    width: 24px;
    height: 24px;
}

/* 弹幕列表按钮 */
.danmaku-list-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 200;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    position: relative;
}

.danmaku-list-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.danmaku-list-toggle:active {
    transform: scale(0.95);
}

.danmaku-list-toggle svg {
    width: 24px;
    height: 24px;
}

.danmaku-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
}

/* 弹幕列表弹窗 */
.danmaku-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.danmaku-modal-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.danmaku-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.danmaku-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.danmaku-modal-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.danmaku-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.danmaku-modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.danmaku-modal-body::-webkit-scrollbar {
    width: 8px;
}

.danmaku-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.danmaku-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.danmaku-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.empty-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    padding: 40px 20px;
}

.danmaku-list-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.danmaku-list-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.danmaku-item-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.danmaku-item-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.danmaku-item-time svg {
    width: 14px;
    height: 14px;
}

/* 烟花画布 */
#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

/* 弹幕容器 */
#danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* 弹幕项 */
.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: danmaku-move linear;
    pointer-events: none;
}

@keyframes danmaku-move {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100vw - 100%));
    }
}

/* 自己发送的弹幕高亮 */
.danmaku-my-own {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.4),
        rgba(255, 165, 0, 0.3)) !important;
    border: 2px solid rgba(255, 215, 0, 0.8) !important;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 165, 0, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.2) !important;
    font-weight: 700 !important;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(255, 215, 0, 0.8),
        0 0 25px rgba(255, 165, 0, 0.5) !important;
    animation: danmaku-move linear, glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 165, 0, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 165, 0, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

/* 弹幕输入区 */
.danmaku-input-wrapper {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: auto;
}

.danmaku-input-panel {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.danmaku-input-panel:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

#danmakuInput {
    width: 350px;
    padding: 12px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#danmakuInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#danmakuInput:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.send-btn {
    padding: 12px 30px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

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

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 液态玻璃卡片效果 */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: floatCard 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* 玻璃卡片悬浮动画 */
@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 玻璃卡片光泽效果 */
.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 标题样式 */
.subtitle {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
    letter-spacing: 8px;
    font-weight: 300;
}

.title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 40px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.gradient-text {
    background: linear-gradient(135deg, #fff, #f0f0f0, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

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

/* 倒计时容器 */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* 时间块 */
.time-block {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 25px;
    min-width: 140px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-block:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.time-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

.time-label {
    font-size: 1rem;
    margin-top: 10px;
    opacity: 0.8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.time-separator {
    font-size: 3rem;
    font-weight: 300;
    opacity: 0.6;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

/* 进度条 */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 1s ease;
    animation: progressShine 2s linear infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

@keyframes progressShine {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.progress-text {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

/* 祝福语 */
.wishes {
    margin-top: 30px;
    animation: fadeInScale 1s ease;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.wish-title {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

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

.wish-text {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.wish-subtext {
    font-size: 1.3rem;
    opacity: 0.8;
    font-style: italic;
}

/* 新副本提示 */
.new-dungeon {
    margin-top: 30px;
    animation: fadeInScale 1s ease;
}

.dungeon-title {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                     0 0 30px rgba(255, 215, 0, 0.6);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 215, 0, 1),
                     0 0 50px rgba(255, 215, 0, 0.8);
    }
}

.dungeon-text {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease infinite;
}

.dungeon-subtext {
    font-size: 1.3rem;
    opacity: 0.8;
    font-style: italic;
}

/* 底部信息 */
.footer {
    margin-top: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.footer p {
    font-size: 1.2rem;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .glass-card {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .countdown {
        gap: 10px;
    }

    .time-block {
        min-width: 100px;
        padding: 20px 15px;
    }

    .time-value {
        font-size: 2.5rem;
    }

    .time-label {
        font-size: 0.9rem;
    }

    .time-separator {
        font-size: 2rem;
    }

    .wish-title {
        font-size: 2rem;
    }

    .wish-text {
        font-size: 1.3rem;
    }

    .wish-subtext {
        font-size: 1rem;
    }

    .footer {
        padding: 15px 20px;
    }

    .footer p {
        font-size: 1rem;
    }

    /* 移动端弹幕输入 */
    #danmakuInput {
        width: 250px;
        font-size: 0.9rem;
    }

    .danmaku-item {
        font-size: 1.2rem;
        padding: 6px 12px;
    }

    .danmaku-input-wrapper {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .time-block {
        min-width: 70px;
        padding: 15px 10px;
    }

    .time-value {
        font-size: 2rem;
    }

    .time-label {
        font-size: 0.75rem;
    }

    .time-separator {
        font-size: 1.5rem;
        display: none;
    }

    .countdown {
        gap: 8px;
    }

    #danmakuInput {
        width: 200px;
        font-size: 0.85rem;
        padding: 10px 15px;
    }

    .send-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .danmaku-item {
        font-size: 1rem;
        padding: 5px 10px;
    }

    .danmaku-input-panel {
        padding: 12px 15px;
    }
}
