* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    animation: backgroundShift 15s ease infinite;
}

@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 背景光线效果 */
.background-rays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(79, 172, 254, 0.15) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(255, 255, 255, 0.08) 50px,
            rgba(255, 255, 255, 0.08) 100px
        );
    pointer-events: none;
    animation: rotate 60s linear infinite, pulse 8s ease-in-out infinite;
    transform-origin: center center;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 头部 */
.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 251, 0.5);
}

.admin-btn {
    background: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite 0.5s;
    position: absolute;
    right: 160px;
    top: 50%;
    transform: translateY(-50%);
}

.admin-btn:hover {
    background: rgba(255, 215, 0, 0.5);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.logout-btn {
    background: rgba(255, 99, 71, 0.3);
    border: 2px solid rgba(255, 99, 71, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite 1s;
    position: absolute;
    right: 310px;
    top: 50%;
    transform: translateY(-50%);
}

.logout-btn:hover {
    background: rgba(255, 99, 71, 0.5);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 主标题 */
.main-title {
    text-align: center;
    margin: 0;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.9) 50%, rgba(240, 147, 251, 0.85) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-title h1 {
    background: linear-gradient(45deg, #ffffff, #f0f0f0, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 58px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
    padding: 12px 36px;
    border-radius: 18px;
    display: inline-block;
    position: relative;
    animation: gradientFlow 3s ease infinite, titleBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    margin: 0;
}

.main-title h1::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.3));
    background-size: 200% 200%;
    border-radius: 20px;
    z-index: -1;
    animation: glow 2s ease-in-out infinite, borderGlow 3s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titleBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.6);
    }
}

/* 抽奖容器 */
.lottery-container {
    max-width: 600px;
    margin: 192px auto 36px;
    padding: 24px;
    position: relative;
    z-index: 10;
}

/* 九宫格 */
.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    background: linear-gradient(135deg, #ff6ec4 0%, #7873f5 50%, #4facfe 100%);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(255, 110, 196, 0.4);
    position: relative;
    animation: gridPulse 4s ease-in-out infinite;
}

.lottery-grid::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #ff6ec4, #7873f5, #4facfe, #00f2fe, #ff6ec4);
    background-size: 300% 300%;
    border-radius: 25px;
    z-index: -1;
    animation: borderGlow 3s ease infinite;
}

@keyframes gridPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.lottery-item {
    background: white;
    border: 3px solid #ff6ec4;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 144px;
    position: relative;
    animation: itemFloat 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 110, 196, 0.2);
}

.lottery-item:nth-child(1) { animation-delay: 0s; }
.lottery-item:nth-child(2) { animation-delay: 0.1s; }
.lottery-item:nth-child(3) { animation-delay: 0.2s; }
.lottery-item:nth-child(4) { animation-delay: 0.3s; }
.lottery-item:nth-child(5) { animation-delay: 0.4s; }
.lottery-item:nth-child(6) { animation-delay: 0.5s; }
.lottery-item:nth-child(7) { animation-delay: 0.6s; }
.lottery-item:nth-child(8) { animation-delay: 0.7s; }
.lottery-item:nth-child(9) { animation-delay: 0.8s; }

.lottery-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 110, 196, 0.6);
    border-color: #7873f5;
}

@keyframes itemFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.lottery-item.active {
    background: linear-gradient(135deg, #ff6ec4, #7873f5);
    border-color: #00f2fe;
    transform: scale(1.15);
    box-shadow: 0 0 50px rgba(255, 110, 196, 1), 0 0 80px rgba(120, 115, 245, 0.8);
    animation: activePulse 0.5s ease-in-out;
}

@keyframes activePulse {
    0%, 100% { 
        transform: scale(1.15);
        box-shadow: 0 0 50px rgba(255, 110, 196, 1), 0 0 80px rgba(120, 115, 245, 0.8);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 70px rgba(120, 115, 245, 1), 0 0 100px rgba(255, 110, 196, 1);
    }
}



.lottery-item img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 10px;
}

.lottery-item .prize-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
    word-break: break-all;
}

.lottery-item.active .prize-name {
    color: white;
}

/* 抽奖按钮 */
.draw-button {
    width: 100%;
    margin-top: 48px;
    padding: 22px;
    background: linear-gradient(135deg, #ff6ec4, #7873f5, #4facfe, #ff6ec4);
    background-size: 300% 300%;
    border: none;
    border-radius: 60px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 110, 196, 0.6), 0 0 40px rgba(120, 115, 245, 0.4);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: buttonGradient 3s ease infinite, buttonFloat 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.draw-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.draw-button:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 110, 196, 0.8), 0 0 50px rgba(120, 115, 245, 0.6);
}

.draw-button:disabled {
    background: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes buttonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.button-text {
    font-size: 24px;
}

.button-sub {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 3px;
}

/* 按钮内凭证信息显示 */
.button-voucher-info {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1;
}

.button-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.button-voucher-info span {
    white-space: nowrap;
}

#buttonUserName {
    font-weight: bold;
}

#buttonRemaining {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #333;
    font-size: 24px;
}

.close {
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

/* 控制面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* 总中奖率显示 */
.probability-total {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    flex-wrap: wrap;
}

.probability-total .label {
    color: #333;
    font-weight: 600;
}

.probability-total .value {
    font-size: 24px;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s;
}

.probability-total .value.success {
    color: #28a745;
    background: #d4edda;
    border: 2px solid #28a745;
}

.probability-total .value.warning {
    color: #ffc107;
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.probability-total .value.error {
    color: #dc3545;
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.probability-total .status {
    font-size: 14px;
    font-weight: 600;
}

.probability-total .status.success {
    color: #28a745;
}

.probability-total .status.warning {
    color: #ffc107;
}

.probability-total .status.error {
    color: #dc3545;
}

/* 操作按钮组 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.action-btn {
    background: linear-gradient(135deg, #ff6ec4, #7873f5);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 110, 196, 0.6);
    background: linear-gradient(135deg, #7873f5, #4facfe);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #ee5a6f, #c44569);
    box-shadow: 0 5px 15px rgba(238, 90, 111, 0.6);
}

/* 搜索和操作按钮行 */
.search-action-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons-compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn-small {
    background: linear-gradient(135deg, #ff6ec4, #7873f5);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.action-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 110, 196, 0.5);
    background: linear-gradient(135deg, #7873f5, #4facfe);
}

.action-btn-small.danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.action-btn-small.danger:hover {
    background: linear-gradient(135deg, #ee5a6f, #c44569);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.5);
}

/* 奖品列表 */
.prize-list {
    display: grid;
    gap: 15px;
}

.prize-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all 0.3s;
}

.prize-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.prize-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.prize-info h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.prize-info p {
    color: #666;
    font-size: 14px;
}

.prize-info p strong {
    color: #ff6ec4;
    font-size: 16px;
}

.prize-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.edit-btn, .delete-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    width: 80px;
}

.edit-btn {
    background: #4CAF50;
    color: white;
}

.edit-btn:hover {
    background: #45a049;
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #da190b;
}

/* 表单样式 */
.prize-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="file"] {
    padding: 8px;
    font-size: 14px;
}

.form-group small {
    color: #999;
    font-size: 12px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-direction: row;
    margin-top: 20px;
}

.submit-btn, .cancel-btn, .confirm-btn {
    flex: 1;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn {
    background: linear-gradient(135deg, #ff6ec4, #7873f5);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 110, 196, 0.6);
    background: linear-gradient(135deg, #7873f5, #4facfe);
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* 中奖结果弹窗 */
.result-content {
    text-align: center;
    max-width: 400px;
}

.congratulations {
    color: #ff6ec4;
    font-size: 28px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-in-out;
    text-shadow: 0 0 15px rgba(255, 110, 196, 0.6), 0 0 30px rgba(120, 115, 245, 0.4);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-prize {
    margin: 30px 0;
}

.result-prize img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    animation: zoomIn 0.5s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-prize h3 {
    color: #333;
    font-size: 24px;
}

.confirm-btn {
    background: linear-gradient(135deg, #ff6ec4, #7873f5);
    color: white;
    margin: 20px auto 0;
}

.confirm-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 110, 196, 0.6);
}

/* 登录弹窗样式 */
.login-content {
    max-width: 450px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

.login-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.login-header .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.login-header .close:hover {
    transform: rotate(90deg);
    color: #ff6ec4;
}

.login-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-header h2 {
    color: white;
    font-size: 28px;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

.login-form {
    padding: 30px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 20px;
    z-index: 1;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #999;
}

.login-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.login-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.login-btn:active {
    transform: translateY(0);
}

.login-actions .cancel-btn {
    flex: 1;
    padding: 14px;
    background: #f1f3f5;
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-actions .cancel-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 设置面板样式 */
.settings-content {
    max-width: 900px;
}

/* Tab 切换 */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    color: #666;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 奖品库列表 */
.prize-library-list {
    display: grid;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.library-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.library-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    border-color: #667eea;
}

.library-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.library-info h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.library-info p {
    color: #666;
    font-size: 14px;
}

.library-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 九宫格配置容器 */
.grid-config-container {
    margin-top: 20px;
}

.grid-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.grid-slot-item {
    background: white;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.grid-slot-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.grid-slot-item.configured {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.grid-slot-item.empty {
    border-style: dashed;
    background: #f8f9fa;
}

.slot-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.grid-slot-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.slot-info {
    text-align: center;
}

.slot-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.slot-probability {
    font-size: 16px;
    color: #28a745;
    font-weight: bold;
}

.slot-empty {
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* 表单样式增强 */
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.clear-btn {
    padding: 12px 30px;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: #dc3545;
}

.clear-btn:hover {
    background: #dc3545;
    color: white;
}

/* 管理员面板样式 */
.admin-content {
    max-width: 700px;
    max-height: 90vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: column;
}

.admin-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    flex-shrink: 0;
}

.admin-header .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.admin-header .close:hover {
    transform: rotate(90deg);
    color: #ff6ec4;
}

.admin-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: iconFloat 3s ease-in-out infinite;
}

.admin-header h2 {
    color: white;
    font-size: 28px;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.admin-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

.admin-content-body {
    padding: 30px;
    padding-bottom: 50px;
    background: white;
    overflow-y: auto;
    flex: 1;
}

/* 滚动条样式美化 */
.admin-content-body::-webkit-scrollbar {
    width: 8px;
}

.admin-content-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-content-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.admin-content-body::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 管理员卡片 */
.admin-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.admin-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.admin-card:last-child {
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.card-icon {
    font-size: 28px;
}

.card-header h3 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form .input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-form .input-group input {
    width: 100%;
    padding: 14px 14px 14px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.admin-form .input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 复选框组 */
.checkbox-group {
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #667eea;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-title {
    font-weight: bold;
    color: #333;
    font-size: 15px;
}

.checkbox-desc {
    color: #666;
    font-size: 13px;
}

/* 管理员提交按钮 */
.admin-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 8px;
}

.admin-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.admin-submit-btn:active {
    transform: translateY(0);
}

/* 数据管理按钮 */
.data-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.data-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    border: 2px solid #e0e0e0;
}

.data-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.data-btn.download {
    border-color: #28a745;
}

.data-btn.download:hover {
    background: #28a745;
    border-color: #28a745;
}

.data-btn.download:hover .btn-icon,
.data-btn.download:hover .btn-title,
.data-btn.download:hover .btn-desc {
    color: white;
}

.data-btn.upload {
    border-color: #667eea;
}

.data-btn.upload:hover {
    background: #667eea;
    border-color: #667eea;
}

.data-btn.upload:hover .btn-icon,
.data-btn.upload:hover .btn-title,
.data-btn.upload:hover .btn-desc {
    color: white;
}

.btn-icon {
    font-size: 32px;
    transition: all 0.3s;
}

.btn-content {
    text-align: left;
    flex: 1;
}

.btn-title {
    font-weight: bold;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.btn-desc {
    font-size: 12px;
    color: #666;
    transition: all 0.3s;
}

/* 移除旧样式 */
.admin-panel {
    display: none;
}

.admin-section {
    display: none;
}

/* 凭证输入弹窗 */
.voucher-input-content {
    max-width: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
}

.voucher-input-content .modal-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    color: white;
}

.voucher-input-content .modal-header h2 {
    color: white;
    margin: 0;
}

.voucher-input-content .modal-header .close {
    color: white;
}

.voucher-form {
    padding: 30px;
    background: white;
    border-radius: 0 0 24px 24px;
}

.voucher-form .input-group {
    position: relative;
    margin-bottom: 25px;
}

.voucher-form .input-group input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    letter-spacing: 2px;
    background: #f8f9fa;
}

.voucher-form .input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.voucher-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.voucher-info p {
    margin: 8px 0;
    color: #333;
}

/* 凭证列表 */
.voucher-list {
    display: grid;
    gap: 15px;
}

.voucher-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.voucher-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.voucher-item.used {
    opacity: 0.6;
    background: #f8f9fa;
}

.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 280px;
    text-align: center;
}

.voucher-details {
    flex: 1;
}

.voucher-details p {
    margin: 6px 0;
    color: #666;
}

.voucher-details strong {
    color: #333;
}

.text-success {
    color: #28a745;
    font-weight: bold;
}

.text-danger {
    color: #dc3545;
    font-weight: bold;
}

.voucher-actions {
    display: flex;
    gap: 10px;
}

/* 凭证码显示和复制 */
.voucher-code-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #28a745;
}

.voucher-code-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #28a745;
}

.voucher-code-box span {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
    letter-spacing: 2px;
}

.copy-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

/* 中奖记录表格 */
.win-records-table {
    background: white;
    border-radius: 16px;
    padding: 20px;
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.records-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    font-size: 16px;
}

.records-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.records-table tr:last-child td {
    border-bottom: none;
}

.records-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.prizes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prize-record {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #28a745;
}

.prize-num {
    font-weight: bold;
    color: #667eea;
    min-width: 25px;
}

.prize-name {
    font-weight: bold;
    color: #333;
    flex: 1;
}

.prize-time {
    font-size: 12px;
    color: #999;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    background: #6c757d;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 凭证状态显示 */
.voucher-status {
    text-align: center;
    margin-top: 30px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voucher-status p {
    margin: 8px 0;
    font-size: 18px;
    color: #333;
}

.voucher-user {
    font-weight: bold;
}

.voucher-user span {
    color: #667eea;
    font-size: 20px;
}

.voucher-remaining {
    font-weight: bold;
}

.voucher-remaining span {
    color: #28a745;
    font-size: 24px;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .main-title h1 {
        font-size: 36px;
    }
    
    .lottery-container {
        padding: 10px;
    }
    
    .lottery-grid {
        gap: 8px;
        padding: 15px;
    }
    
    .lottery-item {
        padding: 10px;
        min-height: 100px;
    }
    
    .lottery-item img {
        width: 50px;
        height: 50px;
    }
    
    .lottery-item .prize-name {
        font-size: 11px;
    }
    
    .prize-item {
        grid-template-columns: 60px 1fr;
    }
    
    .prize-item img {
        width: 60px;
        height: 60px;
    }
    
    .prize-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        width: 100%;
    }
}
