/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000; /* 纯黑背景作为默认 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
}

/* Canvas 全屏铺满 */
#fireworksCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
    image-rendering: auto;
}

/* UI 覆盖层 */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* 让点击穿透到 Canvas */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 主标题：元旦快乐 */
#main-title {
    font-size: min(4rem, 12vw);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
    color: #fff;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 200, 255, 0.3);
    opacity: 0;
    transform: scale(0.96);
    filter: blur(6px);
    transition: 
        opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#main-title.visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    animation: breathing 4s ease-in-out infinite alternate 1.2s;
}

@keyframes breathing {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 200, 255, 0.6);
        transform: scale(1.02);
    }
}

/* 署名样式 */
#signature {
    position: fixed;
    right: 24px;
    bottom: 24px;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    z-index: 20;
    pointer-events: auto;
}

/* 音效按钮样式 */
#audio-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0.5;
}

#audio-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

#audio-toggle svg {
    width: 24px;
    height: 24px;
}

#audio-toggle.muted svg path {
    /* 简单的禁音图标切换可以通过 JS 也可以用这里的 path 覆盖，如果是单个 SVG 我们可以切样式 */
}

/* 适配刘海屏 */
@supports (padding: env(safe-area-inset-bottom)) {
    #signature {
        right: calc(24px + env(safe-area-inset-right));
        bottom: calc(24px + env(safe-area-inset-bottom));
    }
    #audio-toggle {
        top: calc(24px + env(safe-area-inset-top));
        right: calc(24px + env(safe-area-inset-right));
    }
}
