:root {
    --primary-color: #ff6b6b;
    --secondary-color: #feca57;
    --bg-color: #2d3436;
    --text-color: #fff;
    --cake-base: #f8c291;
    --cake-cream: #fff;
    --candle-color: #e17055;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    display: none; /* 为了防止重叠点击 */
}

/* 欢迎屏幕 */
#welcome-screen {
    background: radial-gradient(circle at center, #636e72 0%, #2d3436 70%);
    z-index: 10;
}

.spotlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: pulse 3s infinite;
}

.content {
    text-align: center;
    z-index: 2;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    animation: float 3s ease-in-out infinite;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 2rem;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.6);
}

.btn:active {
    transform: scale(0.95);
}

/* 派对屏幕 */
#party-screen {
    background: linear-gradient(135deg, #1e272e 0%, #000000 100%);
}

#fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.party-content {
    z-index: 5;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.header-text {
    text-align: center;
    margin-bottom: 2rem;
}

.title-anim {
    font-size: 3rem;
    color: var(--secondary-color);
    text-shadow: 0 0 20px rgba(254, 202, 87, 0.5);
    animation: popIn 1s ease-out forwards;
}

.subtitle-anim {
    font-size: 1.5rem;
    color: #fff;
    opacity: 0;
    animation: slideUp 1s ease-out 0.5s forwards;
}

/* 蛋糕样式 */
.cake-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
    cursor: pointer;
}

#cake-canvas {
    width: 100%;
    height: 100%;
}

.instruction-text {
    position: absolute;
    bottom: -30px;
    width: 100%;
    text-align: center;
    color: #b2bec3;
    font-size: 0.9rem;
    animation: blink 2s infinite;
}

/* 控制按钮 */
.controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

/* 弹幕 */
.danmaku {
    position: absolute;
    white-space: nowrap;
    color: white;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: drift linear forwards;
    pointer-events: none;
    z-index: 4;
}

/* 动画定义 */
@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); opacity: 0.9; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes drift {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* 响应式调整 */
@media (max-width: 600px) {
    h1 { font-size: 3rem; }
    .title-anim { font-size: 2.5rem; }
    .cake-container { transform: scale(0.8); }
}
