* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #8b0000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 200, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 100, 0, 0.1) 0%, transparent 20%);
}

/* --- 核心修改：Canvas 样式 --- */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999; /* 确保在最上层 */
    pointer-events: none; /* 确保不阻挡点击 */
}

/* --- 左上角 Logo --- */
.logo-wrapper {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
}

.site-logo {
    display: block;
    width: 700px;
    max-width: 65%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s;
}

.site-logo:hover { transform: scale(1.05); }

/* 装饰灯笼 */
.decoration { position: fixed; z-index: 0; }
.lantern {
    width: 60px; height: 80px;
    background: linear-gradient(to bottom, #ff3333, #cc0000);
    border-radius: 30px 30px 15px 15px;
    position: fixed;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.lantern:before, .lantern:after { content: ''; position: absolute; background-color: #ffcc00; }
.lantern:before { width: 20px; height: 10px; top: -10px; left: 20px; border-radius: 5px 5px 0 0; }
.lantern:after { width: 10px; height: 20px; bottom: -20px; left: 25px; }
.lantern.top-left { top: 40px; left: 30px; animation: swing 5s infinite ease-in-out; }
.lantern.top-right { top: 40px; right: 30px; animation: swing 5s infinite ease-in-out 0.5s; }
.lantern.bottom-left { bottom: 40px; left: 30px; animation: swing 5s infinite ease-in-out 1s; }
.lantern.bottom-right { bottom: 40px; right: 30px; animation: swing 5s infinite ease-in-out 1.5s; }

@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    padding-top: 100px;
}

header { text-align: center; padding: 30px 0; margin-bottom: 30px; }
h1 {
    font-size: 3.5rem; margin-bottom: 10px; color: #ffcc00;
    text-shadow: 3px 3px 0 #aa0000, 6px 6px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 3px; position: relative; display: inline-block;
}
h1:after { content: ''; position: absolute; bottom: -10px; left: 10%; width: 80%; height: 5px; background: linear-gradient(to right, transparent, #ffcc00, transparent); }
.subtitle { font-size: 1.5rem; color: #ffdd99; margin-bottom: 20px; }

.year {
    color: #ffcc00;
    font-size: 4rem;
    font-weight: bold;
    display: inline-block;
    animation: pulse 2s infinite;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.content { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; }
.main-area { flex: 2; min-width: 300px; }
.side-area { flex: 1; min-width: 250px; }

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 204, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}
.card:before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, #ffcc00, #ff6600, #ffcc00);
    background-size: 1000px 100%; animation: shimmer 3s infinite linear;
}
.card-title { font-size: 1.8rem; margin-bottom: 20px; color: #ffcc00; display: flex; align-items: center; gap: 10px; }

/* 9宫格 */
.lottery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
.lottery-box {
    background: rgba(0, 0, 0, 0.3); border: 2px dashed #ffcc00;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; transition: transform 0.3s; z-index: 5;
}
.lottery-box:hover { border-color: #fff; background: rgba(0, 0, 0, 0.5); }

/* --- 中奖特效 CSS --- */
.lottery-box.flash { animation: boxFlash 0.5s ease-out; }
@keyframes boxFlash {
    0% { background: rgba(0, 0, 0, 0.3); border-color: #ffcc00; }
    50% { background: rgba(255, 255, 255, 0.9); border-color: #fff; box-shadow: 0 0 50px #ffffff; }
    100% { background: rgba(0, 0, 0, 0.3); border-color: #ffcc00; }
}

.lottery-number.winner {
    animation: winnerPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    color: #fff;
    text-shadow: 0 0 30px #ffcc00, 0 0 60px #ff0000, 0 0 10px #fff;
    z-index: 10; font-size: 4.5rem !important;
    transform-origin: center;
}
@keyframes winnerPop {
    0% { transform: scale(1); }
    50% { transform: scale(2.2); filter: brightness(2); }
    75% { transform: scale(1.5); filter: brightness(1.5); }
    100% { transform: scale(1.3); filter: brightness(1); }
}

.lottery-number {
    font-size: 3.5rem; font-weight: 900; color: #ffcc00;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.8), 0 0 40px rgba(255, 102, 0, 0.6);
    font-family: 'Arial', sans-serif;
    position: relative; z-index: 10; transition: all 0.3s;
}

.lottery-controls { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.btn {
    padding: 15px 30px; border: none; border-radius: 50px; font-size: 1.2rem;
    font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 10px;
    transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.btn-start { background: linear-gradient(to right, #ff3333, #ff6600); color: white; }
.btn-start:hover { background: linear-gradient(to right, #ff6600, #ff3333); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); }
.btn-stop { background: linear-gradient(to right, #0066cc, #003366); color: white; }
.btn-stop:hover { background: linear-gradient(to right, #003366, #0066cc); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.winner-list { list-style-type: none; max-height: 600px; overflow-y: auto; }
.winner-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 5px solid #ffcc00;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}
.winner-item:hover { background: rgba(255, 255, 255, 0.2); transform: translateX(5px); }
.winner-name { font-size: 1.5rem; font-weight: bold; }

@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- 奖项徽章样式 --- */
.winner-prize {
    font-size: 1rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.badge-1 { background: linear-gradient(135deg, #ff3333, #ffcc00); border: 1px solid #ffcc00; box-shadow: 0 0 10px rgba(255, 51, 51, 0.5); }
.badge-2 { background: linear-gradient(135deg, #ff8c00, #ffcc00); border: 1px solid #ffcc00; box-shadow: 0 0 10px rgba(255, 140, 0, 0.5); }
.badge-3 { background: linear-gradient(135deg, #007bff, #00bfff); border: 1px solid #00bfff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); }

footer {
    text-align: center; padding: 30px 0;
    border-top: 1px solid rgba(255, 204, 0, 0.3);
    margin-top: 30px; color: #ffdd99; font-size: 1rem;
}
.note { background: rgba(255, 204, 0, 0.1); padding: 15px; border-radius: 10px; margin-top: 20px; font-size: 0.9rem; border-left: 4px solid #ffcc00; }

.winner-list::-webkit-scrollbar { width: 8px; }
.winner-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.winner-list::-webkit-scrollbar-thumb { background: rgba(255, 204, 0, 0.5); border-radius: 4px; }

@media (max-width: 768px) {
    .content { flex-direction: column; }
    h1 { font-size: 2.5rem; }
    .year { font-size: 3rem; }
    .lottery-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .lottery-number { font-size: 2rem; }
    .lottery-controls { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .lantern { display: none; }
    .logo-wrapper { top: 10px; left: 10px; }
    .site-logo { width: 300px; }
    .container { padding-top: 180px; }
}
