/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background-color: #000;
    color: #fff;
}

/* 视频背景 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* 马年主题装饰 */
.year-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    position: relative;
    z-index: 1;
}

.horse-decoration {
    font-size: 4rem;
    animation: horseRun 3s ease-in-out infinite;
}

.horse-decoration.left {
    animation-delay: 0.5s;
}

.horse-decoration.right {
    transform: scaleX(-1);
    animation-delay: 1s;
}

@keyframes horseRun {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(0) translateX(20px);
    }
    75% {
        transform: translateY(10px) translateX(10px);
    }
}

.year-content {
    text-align: center;
    margin: 0 50px;
}

.year-content h1 {
    font-size: 4rem;
    color: #ffd700;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    margin-bottom: 10px;
    font-weight: bold;
    animation: glow 2s ease-in-out infinite alternate;
}

.year-content p {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px #000;
}

/* 鞭炮装饰 */
.firecrackers {
    position: fixed;
    top: 10%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.firecrackers.left {
    left: 5%;
}

.firecrackers.right {
    right: 5%;
}

.firecracker {
    font-size: 2rem;
    animation: firecrackerBlink 1s ease-in-out infinite alternate;
}

.firecracker:nth-child(1) {
    animation-delay: 0s;
}

.firecracker:nth-child(2) {
    animation-delay: 0.3s;
}

.firecracker:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes firecrackerBlink {
    from {
        opacity: 0.5;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 灯笼装饰 */
.lanterns {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.lantern {
    font-size: 3rem;
    animation: lanternSwing 2s ease-in-out infinite;
}

.lantern:nth-child(1) {
    animation-delay: 0s;
}

.lantern:nth-child(2) {
    animation-delay: 0.5s;
}

.lantern:nth-child(3) {
    animation-delay: 1s;
}

.lantern:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes lanternSwing {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

/* 滚动区域标题 */
.scroll-title {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
}

.scroll-title span {
    font-size: 1.8rem;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: titlePulse 1.5s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* 抽奖按钮装饰 */
.btn-decoration {
    margin-left: 10px;
    animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.8) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* 底部装饰 */
.bottom-decoration {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.flower {
    font-size: 2rem;
    animation: flowerBloom 3s ease-in-out infinite;
}

.flower:nth-child(1) {
    animation-delay: 0s;
}

.flower:nth-child(2) {
    animation-delay: 0.6s;
}

.flower:nth-child(3) {
    animation-delay: 1.2s;
}

.flower:nth-child(4) {
    animation-delay: 1.8s;
}

.flower:nth-child(5) {
    animation-delay: 2.4s;
}

@keyframes flowerBloom {
    0%, 100% {
        transform: scale(0.8) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
}

/* 结果装饰 */
.result-decoration {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.firecracker-small {
    font-size: 1.5rem;
    animation: firecrackerBlink 0.8s ease-in-out infinite;
}

.winner-container {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 20px;
    margin: 20px 0;
}

.congratulations {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #ff0000;
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ff0000;
    }
    to {
        text-shadow: 0 0 20px #ffd700, 0 0 30px #ff0000, 0 0 40px #ff0000;
    }
}

/* 抽奖容器 */
.lottery-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}




/* 用户滚动区域 */
.users-scroll-container {
    height: 400px;
    border: 3px solid #ffd700;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    margin-bottom: 50px;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* 标题样式 */
.scroll-title {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.scroll-title span {
    font-size: 28px;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    letter-spacing: 3px;
}

/* 表格样式 */
.user-table {
    width: 100%;
    height: calc(100% - 70px);
    border-collapse: collapse;
    table-layout: fixed;
}

/* 单元格样式 - 白色字体 */
.user-table td {
    padding: 15px 8px;
    text-align: center;
    font-size: 22px;
    color: #ffffff; /* 改为白色字体 */
    font-weight: bold;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    border: none;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7); /* 白色光晕效果 */
    transition: all 0.3s ease;
    position: relative;
}

/* 动画效果 - 新出现的单元格 */
.user-table td.new-cell {
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0% {
        background-color: rgba(255, 215, 0, 0.6);
        transform: scale(1.1);
        color: #ffd700; /* 高亮时使用金色 */
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
        color: #ffffff; /* 恢复白色 */
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    }
}

/* 单元格动画效果 - 用于快速切换 */
.user-table td.animating {
    animation: cellFlash 0.4s ease-in-out;
    background-color: rgba(255, 215, 0, 0.3) !important;
    color: #ffd700; /* 切换时使用金色 */
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

@keyframes cellFlash {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.2;
        transform: scale(0.95);
    }
}

/* 快速闪烁动画 */
.user-table td.quick-flash {
    animation: quickFlash 0.15s ease-in-out;
    color: #ffd700; /* 快速切换时使用金色 */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.9);
}

@keyframes quickFlash {
    0%, 100% { 
        background-color: rgba(255, 215, 0, 0.4);
    }
    50% { 
        background-color: rgba(255, 215, 0, 0.8);
    }
}

/* 斑马线效果 - 调整透明度以适配白色字体 */
.user-table tr:nth-child(odd) td {
    background-color: rgba(255, 215, 0, 0.05); /* 降低透明度 */
}

.user-table tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.05); /* 改为白色透明背景 */
}

/* 单元格边框效果（视觉分隔线） */
.user-table td {
    border-right: 1px solid rgba(255, 215, 0, 0.15); /* 降低边框透明度 */
    border-bottom: 1px solid rgba(255, 215, 0, 0.15); /* 降低边框透明度 */
}

.user-table tr td:last-child {
    border-right: none;
}

.user-table tr:last-child td {
    border-bottom: none;
}

/* 单元格悬停效果 */
.user-table td:hover {
    background-color: rgba(255, 215, 0, 0.2) !important;
    transform: scale(1.03);
    color: #ffd700; /* 悬停时使用金色 */
    text-shadow: 0 0 15px rgba(255, 215, 0, 1);
}

/* 响应式调整 */
@media (max-height: 600px) {
    .users-scroll-container {
        height: 350px;
    }
    
    .user-table td {
        font-size: 18px;
        padding: 12px 6px;
    }
    
    .scroll-title {
        height: 60px;
    }
    
    .scroll-title span {
        font-size: 24px;
    }
    
    .user-table {
        height: calc(100% - 60px);
    }
}

@media (max-height: 500px) {
    .users-scroll-container {
        height: 300px;
    }
    
    .user-table td {
        font-size: 16px;
        padding: 10px 5px;
    }
    
    .scroll-title {
        height: 50px;
    }
    
    .scroll-title span {
        font-size: 20px;
    }
    
    .user-table {
        height: calc(100% - 50px);
    }
}

/* 可选：增强字体显示效果 */
.user-table td {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
}

/* 可选：添加渐变文字效果 */
.user-table td {
    background: linear-gradient(to bottom, #ffffff, #f8f8f8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

/* 如果渐变效果不支持时的回退 */
@supports not (-webkit-background-clip: text) {
    .user-table td {
        color: #ffffff !important;
        background: none;
    }
}







.users-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    position: absolute;
    right: 0;
    transition: transform 0.1s linear;
}

.user-item {
    padding: 15px 25px;
    margin: 0 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

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

/* 滚动动画 */
.rolling {
    animation: roll 0.05s linear infinite;
}

@keyframes roll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-10px);
    }
}

/* 按钮容器 */
.button-container {
    text-align: center;
}

/* 抽奖按钮 */
.lottery-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    background-color: #ffd700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lottery-btn:hover {
    background-color: #ffed4e;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 1);
}

.lottery-btn:active {
    transform: scale(0.95);
}

.lottery-btn.rolling {
    background-color: #ff0000;
    color: #fff;
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }
    to {
        box-shadow: 0 0 40px rgba(255, 0, 0, 1);
    }
}

/* 中奖结果模态框 */
.result-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.5s;
}

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

.result-content {
    background-color: #ffd700;
    margin: 15% auto;
    padding: 50px;
    border: 5px solid #ff0000;
    border-radius: 30px;
    width: 80%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    animation: zoomIn 0.5s;
}

@keyframes zoomIn {
    from {transform: scale(0);}
    to {transform: scale(1);}
}

.close {
    color: #ff0000;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.result-content h2 {
    color: #ff0000;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.winner {
    color: #000;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .year-decoration h1 {
        font-size: 2.5rem;
    }
    
    .year-decoration p {
        font-size: 1.2rem;
    }
    
    .lottery-btn {
        font-size: 1.5rem;
        padding: 15px 40px;
    }
    
    .result-content h2 {
        font-size: 2rem;
    }
    
    .winner {
        font-size: 1.8rem;
    }
}

.gundong1 {
    /* 基础文字样式 */
    font-size: 28px; /* 字体大小（可根据需求调整，比如32px更大） */
    color: #ff0000; /* 纯红色（年会风格可选更喜庆的渐变红） */
    font-weight: bold; /* 加粗，更醒目 */
}


/* 单元格动画效果 - 增强版 */
.user-table td.animating {
    animation: cellFlash 0.4s ease-in-out;
    background-color: rgba(255, 215, 0, 0.3) !important;
}

@keyframes cellFlash {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.2;
        transform: scale(0.95);
    }
}

/* 更快的切换效果 */
.user-table td {
    transition: all 0.2s ease;
}
