/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 25%, #ff5722 50%, #ff9800 75%, #ffc107 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰元素 */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 30% 70%, rgba(255, 0, 0, 0.1) 0%, transparent 20%);
    z-index: -1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 头部样式 - 春节主题 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    position: relative;
}

.header::after {
    content: "🧨";
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2rem;
    animation: firework 2s infinite;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ffd700, #ffa500, #ff6347, #ffd700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    animation: shine 3s ease-in-out infinite;
    font-weight: bold;
}

@keyframes shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes firework {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    letter-spacing: 2px;
    font-weight: 500;
}

/* 主要内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
    border: 3px solid #ffd700;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 0, 0, 0.1) 25%, 
        rgba(255, 215, 0, 0.1) 50%, 
        rgba(255, 0, 0, 0.1) 75%, 
        rgba(255, 215, 0, 0.1) 100%);
    z-index: -1;
    border-radius: 30px;
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 用户信息面板 - 红包风格 */
.user-info-panel {
    background: linear-gradient(145deg, #ffebee, #ffcdd2);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 
        0 8px 25px rgba(255, 0, 0, 0.2),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
    border: 2px solid #ffc0cb;
    position: relative;
}

.user-info-panel::before {
    content: "🧧";
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 2rem;
    background: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.user-input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.user-input-group label {
    font-weight: bold;
    color: #c62828;
    min-width: 120px;
    font-size: 1.1rem;
}

.user-input-group input {
    flex: 1;
    min-width: 180px;
    padding: 12px 15px;
    border: 3px solid #ffc0cb;
    border-radius: 12px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.user-input-group input:focus {
    outline: none;
    border-color: #ff5722;
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.3);
}

.user-input-group button {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.user-input-group button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.6);
}

.user-status {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.user-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-badge {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(198, 40, 40, 0.2);
    min-width: 140px;
}

.user-label {
    font-size: 0.85rem;
    color: #b23b3b;
    font-weight: 600;
    letter-spacing: 1px;
}

.user-name-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c62828;
}

.pool-info {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.draw-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    font-size: 1rem;
}

.count-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(198, 40, 40, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.count-label {
    font-size: 0.85rem;
    color: #8d4a4a;
    font-weight: 600;
}

.count-value {
    font-size: 1.3rem;
    color: #3a2a2a;
    font-weight: 700;
}

.logout-btn {
    background: linear-gradient(145deg, #ff7043, #f4511e);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(244, 81, 30, 0.35);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 81, 30, 0.45);
}

.remaining {
    border-color: rgba(255, 152, 0, 0.35);
}

.total {
    border-color: rgba(156, 39, 176, 0.2);
}

/* 九宫格容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 35px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.grid-container::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 0, 0, 0.1) 50%, 
        rgba(255, 215, 0, 0.1) 100%);
    border-radius: 25px;
    z-index: -1;
}

.grid-item {
    aspect-ratio: 1;
    position: relative;
}

/* 奖品卡片样式 - 红包风格 */
.prize-card {
    background: linear-gradient(145deg, #fff, #f5f5f5);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.15),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.prize-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #ffd700);
    background-size: 300% 100%;
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.prize-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.25),
        0 0 30px rgba(255, 215, 0, 0.3);
}

.prize-card.active {
    border-color: #ff5722;
    background: linear-gradient(145deg, #fff5f5, #ffe0e0);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 0 30px rgba(255, 87, 34, 0.6),
        0 15px 40px rgba(255, 87, 34, 0.3);
}

.prize-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

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

.prize-name {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.empty-card {
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
    opacity: 0.7;
    border: 2px dashed #bdbdbd;
}

/* 中心开始按钮 - 红包样式 */
.grid-center .prize-card {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.grid-center .prize-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shineButton 3s infinite;
}

@keyframes shineButton {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.grid-center .prize-card:hover {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 15px 40px rgba(244, 67, 54, 0.6);
}

.start-button {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.button-text {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    letter-spacing: 2px;
}

/* 结果模态框 - 庆祝风格 */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,215,0,0.9) 0%, rgba(255,0,0,0.8) 100%);
    z-index: 1000;
    animation: modalAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #fff, #fff5f5);
    border-radius: 30px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.3),
        0 0 50px rgba(255, 215, 0, 0.5);
    border: 5px solid #ffd700;
    animation: modalPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    0% { transform: translate(-50%, -50%) scale(0.8); }
    70% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.modal-header {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.modal-header h2 {
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 3px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.winning-prize {
    margin-bottom: 25px;
    position: relative;
}

.prize-display-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: winFloat 2s ease-in-out infinite;
}

@keyframes winFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.prize-display-name {
    font-size: 2.2rem;
    font-weight: bold;
    color: #c62828;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.firework-animation {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    animation: fireworks 1.5s ease-in-out infinite;
}

@keyframes fireworks {
    0%, 100% { opacity: 0; transform: translateX(-50%) scale(0.5); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.5); }
}

.congratulations {
    font-size: 1.3rem;
    color: #333;
    margin: 20px 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.draw-stats {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    border: 2px solid #ffcc80;
}

.draw-stats p {
    margin: 8px 0;
    font-size: 1.2rem;
    color: #e65100;
    font-weight: 500;
}

.modal-footer {
    padding: 25px;
    text-align: center;
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
    display: flex;
    gap: 15px;
    justify-content: center;
}

.again-btn, .close-modal-btn {
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    letter-spacing: 1px;
}

.again-btn {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.6);
}

.close-modal-btn {
    background: linear-gradient(145deg, #607d8b, #455a64);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.4);
}

.close-modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(96, 125, 139, 0.6);
}

/* 管理员入口 */
.admin-entry {
    text-align: center;
    margin: 25px 0;
}

.admin-login-btn {
    background: linear-gradient(145deg, #673ab7, #512da8);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
    font-weight: 500;
}

.admin-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(103, 58, 183, 0.6);
}

/* 管理员登录面板 */
.admin-login-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(103,58,183,0.9) 0%, rgba(63,81,181,0.8) 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px dashed #e1bee7;
}

.login-header h3 {
    color: #4a148c;
    margin: 0;
    font-size: 1.5rem;
}

.close-login-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #7b1fa2;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-login-btn:hover {
    background: rgba(123, 31, 162, 0.1);
    color: #4a148c;
    transform: rotate(90deg);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 3px solid #e1bee7;
}

.login-form label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #4a148c;
    font-size: 1.2rem;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border: 3px solid #e1bee7;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #7b1fa2;
    box-shadow: 0 0 20px rgba(123, 31, 162, 0.3);
}

.login-form button {
    padding: 12px 25px;
    margin: 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.login-form button:first-of-type {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.login-form button:first-of-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.6);
}

.login-form button:last-of-type {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.login-form button:last-of-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.6);
}

/* 管理员面板增强样式 */

.admin-panel {
    background: linear-gradient(145deg, #fff8e1, #ffecb3);
    border: 3px solid #ffd54f;
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.3);
}

.prize-list-container {
    margin-bottom: 25px;
}

.prize-list-container h4 {
    color: #e65100;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.prize-management-form {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #ffd54f;
}

.prize-management-form h4 {
    color: #e65100;
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.form-input {
    padding: 12px;
    border: 2px solid #ffd54f;
    border-radius: 10px;
    font-size: 1rem;
    flex: 1;
    min-width: 120px;
}

.form-input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.emoji-input {
    cursor: pointer;
    text-align: center;
    font-size: 1.5rem;
    background: #fffde7;
}

.emoji-selector-container {
    position: relative;
    flex: 0 0 80px;
}

.emoji-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ffd54f;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.emoji-dropdown.show {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 10px;
}

.emoji-option {
    font-size: 1.5rem;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.emoji-option:hover {
    background: #fff3e0;
    transform: scale(1.2);
}

.probability-input {
    flex: 0 0 100px;
    text-align: center;
}

.form-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.add-btn {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.update-btn {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.6);
}

.save-btn {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.6);
}

.form-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    padding: 10px 0;
    border-top: 1px dashed #ffd54f;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.settings-row label {
    font-weight: bold;
    color: #e65100;
    min-width: 120px;
}

.pool-settings {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #ffd54f;
}

.pool-settings h4 {
    color: #e65100;
    margin-bottom: 20px;
    text-align: center;
}

.user-management {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #4caf50;
}

.user-management h4 {
    color: #2e7d32;
    margin-bottom: 20px;
    text-align: center;
}

.user-management-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-draws-btn {
    background: linear-gradient(145deg, #8bc34a, #689f38);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 195, 74, 0.4);
}

.add-draws-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.6);
}

.user-list-container {
    border-top: 1px dashed #8bc34a;
    padding-top: 15px;
}

.user-list-container h5 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.user-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-draws {
    background: #e8f5e8;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #2e7d32;
}

.config-save-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #2196f3;
}

.config-save-section h4 {
    color: #1565c0;
    margin-bottom: 20px;
    text-align: center;
}

.config-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.save-config-btn {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.reset-config-btn {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.export-config-btn {
    background: linear-gradient(145deg, #9c27b0, #7b1fa2);
    color: white;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.import-config-btn {
    background: linear-gradient(145deg, #ff5722, #e64a19);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.config-buttons .form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.hidden {
    display: none !important;
}

.edit-prize-btn {
    background: #2196f3;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.edit-prize-btn:hover {
    background: #1976d2;
    transform: scale(1.1);
}

.delete-prize-btn {
    background: #f44336;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.delete-prize-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* 抽奖记录管理样式 */
.history-management {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #ff5722;
}

.history-management h4 {
    color: #d84315;
    margin-bottom: 20px;
    text-align: center;
}

.history-management-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    font-weight: 500;
    color: #666;
}

.history-stats span {
    background: #ffebee;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ffcdd2;
}

.history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.refresh-btn {
    background: linear-gradient(145deg, #00bcd4, #0097a7);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
}

.clear-btn {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.clear-today-btn {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.clear-all-btn {
    background: linear-gradient(145deg, #e91e63, #c2185b);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.export-btn {
    background: linear-gradient(145deg, #9c27b0, #7b1fa2);
    color: white;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.history-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.history-filter label {
    font-weight: bold;
    color: #d84315;
}

.history-filter select {
    padding: 10px;
    border: 2px solid #ff5722;
    border-radius: 10px;
    font-size: 1rem;
    min-width: 150px;
}

.filter-btn {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.filtered-history-container {
    border-top: 1px dashed #ff5722;
    padding-top: 15px;
}

.filtered-history-container h5 {
    color: #d84315;
    margin-bottom: 10px;
    text-align: center;
}

.filtered-history {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ffcdd2;
    border-radius: 10px;
    padding: 10px;
    background: #fff3e0;
}

/* 增强的用户管理样式 */
.user-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.user-list-header h5 {
    color: #2e7d32;
    margin: 0;
}

.user-list-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f1f8e9;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    transition: all 0.3s ease;
}

.user-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.2);
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-draws {
    background: #e8f5e8;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #2e7d32;
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.reset-user-btn {
    background: #ffc107;
    color: #333;
}

.reset-user-btn:hover {
    background: #ffb300;
    transform: scale(1.05);
}

.delete-user-btn {
    background: #f44336;
    color: white;
}

.delete-user-btn:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

/* 筛选历史记录项样式 */
.filtered-history-item {
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #ff5722;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filtered-history-item:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.filtered-history-time {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.filtered-history-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filtered-history-user {
    background: linear-gradient(145deg, #2196F3, #1976D2);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.filtered-history-prize {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.filtered-history-delete-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: auto;
    transition: all 0.2s ease;
}

.filtered-history-delete-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* 抽奖历史记录区域样式 */
.draw-history-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(145deg, #fff, #fff5f5);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 3px solid #ffd700;
}

.history-title {
    text-align: center;
    color: #c62828;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.history-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff9800);
    margin: 10px auto;
    border-radius: 2px;
}

.history-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255,255,255,0.8);
    border-radius: 15px;
}

.no-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
    margin: 0;
}

.history-item {
    padding: 15px;
    margin-bottom: 12px;
    background: linear-gradient(145deg, #fff, #f8f8f8);
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.history-time {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.history-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.history-user {
    background: linear-gradient(145deg, #2196F3, #1976D2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.history-prize {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.extra-draws-badge {
    background: linear-gradient(145deg, #FF5722, #E64A19);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 滚动条样式 */
.history-container::-webkit-scrollbar {
    width: 8px;
}

.history-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
}

/* 额外抽奖机会奖品卡片特殊样式 */
.extra-draws-card {
    border: 2px solid #FF5722 !important;
    background: linear-gradient(145deg, #fff, #fff8f5) !important;
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.extra-draws-card::before {
    content: '🎟️';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    animation: bounce 1s infinite;
}

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

.extra-draws-card .prize-name {
    color: #FF5722 !important;
    font-weight: 600 !important;
}

/* 响应式设计 */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .user-info-panel {
        padding: 20px;
    }
    
    .user-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-input-group label {
        text-align: center;
    }
    
    .user-status {
        gap: 15px;
    }

    .user-meta {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .draw-counts {
        grid-template-columns: 1fr;
    }
    
    .grid-container {
        gap: 12px;
    }
    
    .prize-icon {
        font-size: 2.5rem;
    }
    
    .prize-name {
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .prize-display-icon {
        font-size: 4rem;
    }
    
    .prize-display-name {
        font-size: 1.8rem;
    }
    
    .add-prize-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .pool-settings {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .login-form {
        padding: 30px 20px;
        margin: 20px;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .grid-container {
        gap: 10px;
    }
    
    .prize-icon {
        font-size: 2rem;
    }
    
    .prize-name {
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 0.6s ease-in-out;
}

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

.bounce-animation {
    animation: bounce 1.2s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.shake-animation {
    animation: shake 0.6s ease;
}

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

.fadeIn-animation {
    animation: fadeIn 0.5s ease;
}

/* 管理员模式特殊样式 */
.admin-mode {
    border: 5px solid #7b1fa2;
    box-shadow: 0 0 30px rgba(123, 31, 162, 0.4);
}

/* 额外的春节装饰动画 */
@keyframes snowFall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.snowflake {
    position: fixed;
    top: -50px;
    color: #fff;
    font-size: 2rem;
    animation: snowFall 15s linear infinite;
    z-index: 100;
    pointer-events: none;
}

.snowflake:nth-child(2n) { animation-delay: 2s; }

/* 新增的炫酷奖品展示动画 */

/* 旋转入场动画 - 增强调度和可见性 */
@keyframes spinEntrance {
    0% { 
        transform: rotate(0deg) scale(0) translateY(50px);
        opacity: 0;
    }
    33% {
        transform: rotate(120deg) scale(0.7) translateY(15px);
        opacity: 0.5;
    }
    66% { 
        transform: rotate(240deg) scale(1.1) translateY(-15px);
        opacity: 1;
    }
    100% { 
        transform: rotate(360deg) scale(1) translateY(0);
        opacity: 1;
    }
}

.spin-entrance {
    animation: spinEntrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    /* 确保元素可见 - 增强模态框环境下的显示效果 */
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* 闪烁浮动动画 - 增强视觉效果 */
@keyframes sparkleFloat {
    0% { 
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    15% {
        transform: translateY(-15px) scale(0.5);
        opacity: 0.3;
    }
    30% { 
        transform: translateY(-30px) scale(1);
        opacity: 1;
    }
    70% { 
        transform: translateY(-60px) scale(1);
        opacity: 1;
    }
    85% {
        transform: translateY(-75px) scale(0.7);
        opacity: 0.5;
    }
    100% { 
        transform: translateY(-90px) scale(0);
        opacity: 0;
    }
}

/* 彩带下落动画 */
@keyframes confettiFall {
    0% { 
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 强化版烟花粒子动画 */
@keyframes enhancedFirework {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    30% { 
        transform: scale(1.5);
        opacity: 1;
    }
    70% { 
        transform: scale(1);
        opacity: 0.8;
    }
    100% { 
        transform: scale(0);
        opacity: 0;
    }
}

/* 光芒四射效果 */
@keyframes radiateLight {
    0% { 
        box-shadow: 0 0 0px 0px rgba(255, 215, 0, 0.5);
    }
    50% { 
        box-shadow: 0 0 50px 20px rgba(255, 215, 0, 0.8);
    }
    100% { 
        box-shadow: 0 0 0px 0px rgba(255, 215, 0, 0);
    }
}

.radiate-light {
    animation: radiateLight 1.5s ease-in-out infinite;
}

/* 多重弹跳效果 */
@keyframes multiBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    15% { transform: translateY(-40px) scale(1.1); }
    30% { transform: translateY(-20px) scale(0.9); }
    45% { transform: translateY(-60px) scale(1.05); }
    60% { transform: translateY(-30px) scale(0.95); }
    75% { transform: translateY(-45px) scale(1.02); }
    90% { transform: translateY(-15px) scale(0.98); }
}

.multi-bounce {
    animation: multiBounce 2s ease-in-out;
}

.advanced-management-btn {
    background: linear-gradient(145deg, #9c27b0, #7b1fa2);
    color: white;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.advanced-management-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.6);
}
