:root {
    --pool-a-color: #FF6B6B;
    --pool-b-color: #4ECDC4;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #8b0000 0%, #1a0000 100%);
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before, body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffd700" opacity="0.1"><path d="M12 2L9.19 8.63L2 9.24L7.46 13.97L5.82 21L12 17.27L18.18 21L16.54 13.97L22 9.24L14.81 8.63L12 2Z"/></svg>');
    background-repeat: repeat;
    opacity: 0.1;
    z-index: -1;
}

body::before {
    top: -150px;
    left: -150px;
    transform: rotate(45deg);
}

body::after {
    bottom: -150px;
    right: -150px;
    transform: rotate(-45deg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.title {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 0 20px rgba(255, 215, 0, 0.3);
    font-size: 3.5rem;
    margin-bottom: 50px;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                    0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                    0 0 30px rgba(255, 215, 0, 0.5);
    }
}

.pools-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
}

.pool-button {
    position: relative;
    width: 300px;
    height: 400px;
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(45deg, #cc0000, #8b0000) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;  /* 移除链接下划线 */
}

.pool-a {
    background: linear-gradient(45deg, var(--pool-a-color), #FF8E8E);
}

.pool-b {
    background: linear-gradient(45deg, var(--pool-b-color), #6BE4D9);
}

.pool-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.pool-title {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.pool-icon {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 4rem;
    margin-top: 20px;
}

.pool-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 215, 0, 0.2),
        transparent
    ) !important;
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.pool-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

.pool-button:active {
    transform: translateY(-5px);
}

@keyframes shine {
    0% {
        top: -100%;
        left: -100%;
    }
    100% {
        top: 100%;
        left: 100%;
    }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .pools-container {
        flex-direction: column;
        align-items: center;
    }
    
    .pool-button {
        width: 250px;
        height: 300px;
    }
    
    .title {
        font-size: 2rem;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #8b0000 0%, #1a0000 100%) !important;
    border: 2px solid #ffd700 !important;
    color: #ffd700 !important;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}

.cards-container {
    width: 800px;
    max-width: 95%;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
}

/* 统一输入组样式 */
.input-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

/* 统一输入框样式 */
#studentName, #studentNameB {
    flex: 1;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 1rem;
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
}

#studentName {
    border: 2px solid var(--pool-a-color);
}

#studentNameB {
    border: 2px solid var(--pool-b-color);
}

/* 统一按钮样式 */
#startLottery, #startLotteryB {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 1rem;
    font-weight: bold;
    min-width: 120px;
    height: 48px;
    background: linear-gradient(45deg, #d4af37 0%, #f1c40f 100%) !important;
    color: #8b0000 !important;
}

#startLottery {
    background: var(--pool-a-color);
}

#startLotteryB {
    background: var(--pool-b-color);
}

#startLottery:hover, #startLotteryB:hover {
    transform: scale(1.05);
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    height: 340px;  /* 固定高度 */
    position: relative;
}

/* 卡片样式 */
.card {
    position: relative;
    height: 150px;
    perspective: 1000px;
    cursor: pointer;
    background: linear-gradient(45deg, #d4af37 0%, #f1c40f 100%);
    border: 2px solid #ffd700;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 18px;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px;
    box-sizing: border-box;
}

.card-front {
    background: linear-gradient(45deg, #cc0000 0%, #ff0000 100%);
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: linear-gradient(45deg, #8b0000 0%, #cc0000 100%);
    color: #ffd700;
    transform: rotateY(180deg);
    border: 2px solid #ffd700;
    padding: 10px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card {
        height: 120px;
    }
} 

/* 修改记录按钮样式 */
.record-button {
    position: relative;
    width: 300px;
    height: 400px;
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(45deg, #cc0000, #8b0000) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;  /* 移除链接下划线 */
    background: none;  /* 移除旧的背景色 */
}

.record-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

.record-button:active {
    transform: translateY(-5px);
}

.record-button .pool-title {
    color: #ffd700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.record-button .pool-icon {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 4rem;
    margin-top: 20px;
}

.record-button .pool-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 215, 0, 0.2),
        transparent
    ) !important;
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* 记录表格样式 */
.record-container {
    width: 800px;
    max-width: 95%;
    background: white;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.record-table th,
.record-table td {
    padding: 15px 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}

.record-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.record-table tr:hover {
    background-color: #f5f5f5;
}

.use-btn {
    padding: 6px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.use-btn:hover {
    background: #45a049;
}

/* 修改确认模态框样式 */
.confirm-container {
    width: 400px;
    padding: 30px;
    text-align: left;
}

.confirm-container h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.confirm-btn,
.cancel-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-btn {
    background-color: #4CAF50;  /* 绿色 */
}

.cancel-btn {
    background-color: #f44336;  /* 红色 */
}

.confirm-btn:hover {
    background-color: #45a049;  /* 深绿色 */
    transform: scale(1.05);
}

.cancel-btn:hover {
    background-color: #da190b;  /* 深红色 */
    transform: scale(1.05);
}

/* 奖品提示框样式 */
.prize-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: linear-gradient(135deg, #8b0000 0%, #1a0000 100%);
    border: 2px solid #ffd700;
    color: #ffd700;
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    opacity: 0;
    z-index: 2000;
    transition: all 0.3s ease;
}

.prize-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.prize-alert h2 {
    color: #ffd700;
    margin: 0 0 20px 0;
    font-size: 1.8rem;
}

.prize-alert .prize-name {
    color: #FF6B6B;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.prize-alert .student-name {
    color: #4CAF50;
    font-weight: bold;
} 

/* B奖池卡片正面样式 */
#cardsBModal .card-front {
    background: linear-gradient(45deg, #cc0000 0%, #ff0000 100%);
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#cardsBModal .card-back {
    background: linear-gradient(45deg, #8b0000 0%, #cc0000 100%);
    color: #ffd700;
    border: 2px solid #ffd700;
}

/* B奖池输入框样式 */
#studentNameB {
    border: 2px solid var(--pool-b-color);
}

#startLotteryB {
    background: var(--pool-b-color);
} 

/* 使用结果提示框样式 */
.result-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: white;
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    opacity: 0;
    z-index: 2000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.result-alert.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.result-icon {
    font-size: 3rem;
}

.result-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.result-success {
    color: #4CAF50;
}

.result-error {
    color: #f44336;
} 

/* 修改链接按钮样式 */
.pools-container a.record-button {
    text-decoration: none;  /* 去掉下划线 */
    color: inherit;         /* 继承父元素的颜色 */
} 

/* 概率设置样式 */
.probability-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    position: relative;
}

.probability-section {
    margin-bottom: 40px;
}

.probability-section h2 {
    font-size: 2.5rem;  /* 增大标题字体 */
    color: #ffd700;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.probability-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.probability-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.probability-item label {
    font-size: 1.4rem;  /* 增大标签字体 */
    color: #ffd700;
    min-width: 200px;  /* 确保标签有足够空间 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.probability-item .probability-slider {
    flex: 1;
    height: 20px;  /* 增加滑块高度 */
}

.probability-item .probability-value {
    font-size: 1.3rem;  /* 增大概率值字体 */
    color: #ffd700;
    min-width: 80px;  /* 确保概率值有足够空间 */
}

/* 修改按钮容器样式 */
.probability-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    z-index: 1000;
}

.probability-buttons button {
    font-size: 1.4rem;
    padding: 15px 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px; /* 设置最小宽度 */
    background: linear-gradient(45deg, #d4af37 0%, #f1c40f 100%);
    color: #8b0000;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.probability-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* 修改内容区域样式 */
.probability-sections-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 120px;
}

/* 添加B奖池的所有奖品 */
.probability-section:nth-child(2) .probability-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 添加滚动条样式 */
.probability-container::-webkit-scrollbar {
    width: 8px;
}

.probability-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.probability-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.probability-container::-webkit-scrollbar-thumb:hover {
    background: #555;
} 

/* 添加洗牌动画样式 */
@keyframes shuffle {
    0% {
        transform: translateX(0) rotate(0);
    }
    25% {
        transform: translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateX(-20px) rotate(-5deg);
    }
    75% {
        transform: translateX(20px) rotate(5deg);
    }
    100% {
        transform: translateX(0) rotate(0);
    }
}

.shuffling .card {
    animation: shuffle 0.5s ease-in-out;
}

.shuffling .card:nth-child(2n) {
    animation-delay: 0.1s;
}

.shuffling .card:nth-child(3n) {
    animation-delay: 0.2s;
}

.shuffling .card:nth-child(4n) {
    animation-delay: 0.3s;
}

.shuffling .card:nth-child(5n) {
    animation-delay: 0.4s;
} 

/* 添加洗牌动画相关样式 */
.card.shuffling {
    position: absolute;
    width: calc(20% - 15px);  /* 保持与网格布局时相同的宽度 */
    height: 150px;
    margin: 0;
    transition: all 0.3s ease;
    transform-origin: center center;
}

/* 洗牌时的网格样式 */
.cards-grid.shuffling {
    display: block;
    height: 340px;  /* 与正常状态保持相同高度 */
    width: 100%;
    position: relative;
}

/* 动画结束后恢复网格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
} 

/* 修改主题切换按钮样式 */
.theme-switcher {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.theme-switcher:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 主题选择模态框样式 */
.theme-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.theme-buttons .pool-button {
    width: 100%;
    height: 200px;
}

/* 移除旧的主题列表样式 */
.theme-list, .theme-item {
    display: none;
} 

/* 新年主题样式 */
body.theme-newyear {
    background: linear-gradient(135deg, #8b0000 0%, #1a0000 100%);
}

.theme-newyear .card {
    background: linear-gradient(45deg, #d4af37 0%, #f1c40f 100%);
    border: 2px solid #ffd700;
}

.theme-newyear .card-inner {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.theme-newyear .card-front {
    background: linear-gradient(45deg, #cc0000 0%, #ff0000 100%);
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-newyear .card-back {
    background: linear-gradient(45deg, #8b0000 0%, #cc0000 100%);
    color: #ffd700;
}

.theme-newyear .modal-content {
    background: linear-gradient(135deg, #8b0000 0%, #1a0000 100%);
    border: 2px solid #ffd700;
    color: #ffd700;
}

.theme-newyear .pool-button {
    background: linear-gradient(45deg, #cc0000, #8b0000);
    border: 2px solid #ffd700;
}

.theme-newyear .pool-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.theme-newyear .pool-title {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.theme-newyear button {
    background: linear-gradient(45deg, #d4af37 0%, #f1c40f 100%);
    color: #8b0000;
    border: none;
}

.theme-newyear button:hover {
    background: linear-gradient(45deg, #f1c40f 0%, #d4af37 100%);
}

/* 确保模态框样式正确 */
#themeModal .modal-content {
    width: 80%;
    max-width: 600px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 20px;
    padding: 30px;
}

#themeModal h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

#themeModal .pool-button {
    transition: all 0.3s ease;
}

#themeModal .pool-button[data-theme="default"] {
    background: linear-gradient(45deg, #4CAF50, #2196F3);
}

#themeModal .pool-button[data-theme="newyear"] {
    background: linear-gradient(45deg, #cc0000, #8b0000);
    border: 2px solid #ffd700;
}

#themeModal .pool-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
} 

/* 添加红包装饰 */
.container::before {
    content: '福';
    position: fixed;
    font-size: 200px;
    color: rgba(255, 215, 0, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    pointer-events: none;
    font-family: 'STKaiti', 'KaiTi', serif;
    z-index: -1;
} 

/* 确保B奖池卡片也有圆角 */
#cardsBModal .card,
#cardsBModal .card-inner,
#cardsBModal .card-front,
#cardsBModal .card-back {
    border-radius: 20px;
}

/* 优化卡片阴影效果 */
.card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.2);
} 

/* 响应式调整 */
@media (max-width: 768px) {
    .record-button {
        width: 250px;
        height: 300px;
    }
    
    .record-button .pool-title {
        font-size: 2rem;
    }
    
    .record-button .pool-icon {
        font-size: 3rem;
    }
} 

/* 添加礼花容器样式 */
.confetti-container {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    width: 20px;
    height: 20px;
}

.confetti-container.left {
    left: 0;
}

.confetti-container.right {
    right: 0;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffd700;
    opacity: 0;
} 

/* 响应式调整 */
@media (max-width: 768px) {
    .probability-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .probability-item label {
        font-size: 1.2rem;
    }
    
    .container h1 {
        font-size: 2.5rem;
    }
    
    .probability-section h2 {
        font-size: 2rem;
    }
} 