
/* 基础样式 */
body {
    background: linear-gradient(135deg, #1a1f35 0%, #2d3a6d 100%);
    transition: background-image 0.5s ease;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 导航栏样式调整 */
.navbar {
    background: transparent !important;
    border: none;
    height: 60px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-text {
    color: #fff !important;
    font-size: 20px;
    font-weight: 500;
}

.navbar-brand {
    color: #fff !important;
}

#refreshBtn {
    color: rgba(255, 255, 255, 0.8);
}

#refreshBtn:hover {
    color: #fff;
}

/* 卡片样式调整 */
.card {
    background: rgba(26, 31, 53, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: calc(100vh - 180px);
    overflow-y: auto;
}

/* 主容器样式调整 */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    min-height: calc(100vh - 60px);
    overflow: hidden;
    margin-bottom: 80px;
}

.raffle-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(26, 31, 53, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

/* 标题样式 */
.card-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 25px;
}

/* 矩阵抽奖区域样式 */
.matrix-container {
    width: 100%;
    /* 减小容器高度，为按钮区域留出空间 */
    height: calc(100vh - 420px);
    min-height: 300px;
    margin: 10px auto;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.matrix-grid {
    display: grid;
    gap: 12px;
    padding: 0px;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(auto-fill, minmax(70px, 70px));
    grid-auto-rows: 70px;
    overflow-y: auto;
    justify-content: center;
    align-content: start;
}

/* 自定义滚动条样式 */
.matrix-grid::-webkit-scrollbar {
    width: 8px;
}

.matrix-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 8px 0;
}

.matrix-grid::-webkit-scrollbar-thumb {
    background: rgba(95, 228, 209, 0.5);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.matrix-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(95, 228, 209, 0.7);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox滚动条样式 */
.matrix-grid {
    scrollbar-width: thin;
    scrollbar-color: rgba(95, 228, 209, 0.5) rgba(255, 255, 255, 0.1);
}

/* 方块样式优化 */
.matrix-item {
    background: linear-gradient(145deg, #ffffff, #ebeeec);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    padding: 5px;
    text-align: center;
    word-break: break-all;
    overflow: hidden;
    border: none;
    box-shadow: 
        8px 8px 15px rgba(0, 0, 0, 0.15),
        2px 2px 15px rgba(255, 255, 255, 1),
        inset 0 0 0 rgba(255, 255, 255, 0.4),
        inset 0 0 0 rgba(0, 0, 0, 0.05);
    width: 70px;
    height: 70px;
    margin: 2px;
    aspect-ratio: 1;
    position: relative;
    transform: translateY(0);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* 方块悬浮效果 */
.matrix-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        12px 12px 20px rgba(0, 0, 0, 0.2),
        0px 0px 10px rgba(255, 255, 255, 1),
        inset 0 0 0 rgba(255, 255, 255, 0.4),
        inset 0 0 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 1);
}

/* 活跃状态优化 */
.matrix-item.active {
    background: linear-gradient(145deg, #1a75ff, #0052cc);
    color: #fff;
    transform: scale(1.2);
    box-shadow: 
        0 0 40px rgba(26, 117, 255, 0.6),
        inset 2px 2px 5px rgba(255, 255, 255, 0.2),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 中奖状态优化 */
.matrix-item.winner {
    animation: winnerPulse 1.5s infinite;
    background: linear-gradient(145deg, #2ecc71, #25a25a);
    color: #fff;
    font-weight: bold;
    box-shadow: 
        0 0 50px rgba(46, 204, 113, 0.7),
        inset 2px 2px 5px rgba(255, 255, 255, 0.2),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes winnerPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 
            0 0 40px rgba(46, 204, 113, 0.5),
            inset 2px 2px 5px rgba(255, 255, 255, 0.2),
            inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    }
    50% { 
        transform: scale(1.2); 
        box-shadow: 
            0 0 60px rgba(46, 204, 113, 0.8),
            inset 2px 2px 5px rgba(255, 255, 255, 0.3),
            inset -2px -2px 5px rgba(0, 0, 0, 0.15);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 
            0 0 40px rgba(46, 204, 113, 0.5),
            inset 2px 2px 5px rgba(255, 255, 255, 0.2),
            inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    }
}

/* 导入名单对话框样式 */
.import-area {
    width: 100%;
    height: 200px;
    border: 2px dashed rgba(95, 228, 209, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    resize: none;
    background: #fff;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

/* 历史记录容器 */
.history-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
    padding-right: 10px;
}

/* 自定义滚动条 */
.history-container::-webkit-scrollbar {
    width: 4px;
}

.history-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.history-container::-webkit-scrollbar-thumb {
    background: rgba(95, 228, 209, 0.3);
    border-radius: 2px;
}

/* 中奖记录样式 */
.list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    margin-bottom: 8px;
    border-radius: 8px !important;
    color: #fff;
    transition: all 0.3s ease;
    padding: 15px;
}

.list-group-item.latest {
    background: rgba(95, 228, 209, 0.2);
    box-shadow: 0 0 20px rgba(95, 228, 209, 0.2);
    transform: scale(1.02);
}

.list-group-item .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* 历史记录面板样式 */
.history-panel {
    position: fixed;
    top: 70px;
    right: -420px;
    background: rgba(26, 31, 53, 0.95);
    padding: 10px;
    backdrop-filter: blur(10px);
    border-left: 2px solid rgba(95, 228, 209, 0.3);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    width: 400px;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease-in-out;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.history-panel.show {
    right: 0;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease-in-out;
}

/* 中奖记录标题样式 */
.history-panel h4 {
    color: rgba(95, 228, 209, 0.9);
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .history-panel {
        width: 100%;
        right: -100%;
    }
}

/* 背景选择面板样式 */
.background-panel {
    position: fixed;
    bottom: 80px;
    right: -320px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(10px);
}

.background-panel.show {
    right: 20px;
}

.background-section h6 {
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.background-option {
    height: 60px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.background-option:hover {
    transform: scale(1.05);
}

.background-option.active {
    border: 2px solid #5FE4D1;
    box-shadow: 0 0 10px rgba(95, 228, 209, 0.5);
}

.background-option .bg-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    text-align: center;
}

/* 加载状态指示器样式 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 添加滚动条样式 */
.matrix-grid::-webkit-scrollbar {
    width: 8px;
}

.matrix-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 8px 0;
}

.matrix-grid::-webkit-scrollbar-thumb {
    background: rgba(95, 228, 209, 0.5);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.matrix-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(95, 228, 209, 0.7);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox滚动条样式 */
.matrix-grid {
    scrollbar-width: thin;
    scrollbar-color: rgba(95, 228, 209, 0.5) rgba(255, 255, 255, 0.2);
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .matrix-container {
        height: calc(100vh - 450px);
        min-height: 250px;
        margin: 5px auto;
    }

    .text-center.mt-4 {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        margin: 10px 0 60px 0 !important;
    }

    .draw-options {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
        display: flex;
        gap: 8px;
    }

    .draw-option {
        flex: 1;
        padding: 6px 8px;
        font-size: 12px;
        min-width: auto;
        text-align: center;
    }

    #startBtn {
        width: 100%;
        padding: 10px;
        margin: 5px 0;
    }

    .status-info {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .last-winner, .remain-count {
        flex: 1;
        padding: 8px;
        font-size: 12px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 针对超小屏幕的额外优化 */
@media (max-width: 320px) {
    .matrix-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 45px));
        grid-auto-rows: 45px;
        gap: 6px;
    }

    .matrix-item {
        width: 45px;
        height: 45px;
        font-size: 11px;
    }
}

/* 调整卡片内边距 */
.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

/* 调整标题间距 */
.card-title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 500;
    color: #1a1f35;
}

/* 调整底部按钮区域 */
.text-center.mt-4 {
    margin-top: 10px !important;
    padding-bottom: 10px;
}

/* 调整剩余人数显示 */
.remain-count {
    margin-top: 10px;
    font-size: 14px;
}

/* 调整空格提示文字 */
.space-hint {
    font-size: 12px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* 右侧浮动按钮 */
.float-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.float-buttons .btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 31, 53, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    padding: 0;
}

.float-buttons .btn:hover {
    background: rgba(26, 31, 53, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.float-buttons .btn:last-child {
    margin-bottom: 0;
}

/* 修改模态框样式 */
.modal-content {
    background: #fff;
    color: #333;
}

/* 历史记录面板样式 */
.history-panel h4 {
    color: #fff;
}

.history-panel .history-close {
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

.history-panel .btn-outline-danger {
    color: #fff;
    border-color: #fff;
}

/* 添加最后中奖者信息样式 */
.last-winner {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2E7D32;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.last-winner:empty {
    display: none;
}

/* 全屏模式优化 */
body.fullscreen .card {
    height: calc(100vh - 100px);
    margin: 20px;
}

body.fullscreen .matrix-container {
    max-height: calc(100vh - 200px);
}

body.fullscreen .matrix-grid {
    gap: 15px;
    padding: 20px;
}

/* 预定义背景样式 */
body.bg-gradient-blue { background: linear-gradient(135deg, #1a1f35 0%, #2d3a6d 100%) !important; }
body.bg-gradient-purple { background: linear-gradient(135deg, #2A0845 0%, #6441A5 100%) !important; }
body.bg-gradient-dark { background: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%) !important; }
body.bg-gradient-red { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%) !important; }
body.bg-gradient-green { background: linear-gradient(135deg, #134E5E 0%, #71B280 100%) !important; }
body.bg-gradient-cyan { background: linear-gradient(135deg, #1A2980 0%, #26D0CE 100%) !important; }

/* 添加连抽选项样式 */
.draw-options {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.draw-option {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.draw-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.draw-option.active {
    background: rgba(95, 228, 209, 0.2);
    border-color: #5FE4D1;
    color: #5FE4D1;
}

.draw-option input[type="radio"] {
    display: none;
}

/* 修改按钮组样式 */
.btn-group {
    margin-bottom: 15px;
}

/* 添加音乐控制按钮样式 */
.music-control {
    position: fixed;
    right: 20px;
    top: 20px;
    display: flex;
    gap: 10px;
    z-index: 900;
}

.music-control .btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 31, 53, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    padding: 0;
    border-radius: 50%;
}

.music-control .btn:hover {
    background: rgba(26, 31, 53, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.music-control .btn.active {
    background: rgba(95, 228, 209, 0.2);
    color: #5fe4d1;
}

/* 音乐选择面板样式 */
.music-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(26, 31, 53, 0.95);
    border-radius: 12px;
    padding: 20px;
    width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.music-panel h6 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-weight: 500;
}

.music-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.music-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
}

.music-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.music-item.active {
    background: rgba(95, 228, 209, 0.2);
    color: #5fe4d1;
}

.music-item i {
    margin-right: 10px;
    font-size: 14px;
}

.music-item span {
    font-size: 14px;
}

.music-panel.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* 底部控制区域样式 */
.text-center.mt-4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 31, 53, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0 !important;
    position: relative;
    z-index: 10;
}

/* 抽奖次数选择样式 */
.draw-options {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin: 10px 0;
}

.draw-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    text-align: center;
}

/* 开始按钮区域样式 */
#startBtn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 8px 25px;
    font-size: 16px;
    border-radius: 4px;
    color: #fff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    min-width: 140px;
}

/* 状态信息区域样式 */
.status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
}

.last-winner {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    margin: 10px 0;

    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    backdrop-filter: blur(5px);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remain-count {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    margin: 10px 0;

    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    min-width: 100px;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.user-info i {
    color: #5FE4D1;
}

.user-info span {
    color: #fff;
    font-size: 14px;
}

/* 工具栏样式优化 */
.tool-stats {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(26, 31, 53, 0.7);
    backdrop-filter: blur(10px); 
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-item i {
    font-size: 16px;
}

.stat-item span {
    font-size: 14px;
}

.stat-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.stat-item a:hover {
    color: #5FE4D1;
}

/* 为底部工具栏添加上方阴影 */
.tool-stats::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

/* 为底部工具栏添加动画效果 */
.tool-stats {
    transition: transform 0.3s ease;
}

.tool-stats:hover {
    transform: translateY(-2px);
}

/* 调整主容器底部间距，防止被工具栏遮挡 */
.main-container {
    margin-bottom: 80px;
}

/* 中奖者浮层样式 */
.winner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.winner-overlay.show {
    opacity: 1;
    visibility: visible;
}

.winner-name {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    padding: 30px 50px;
    border-radius: 15px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.5);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.winner-overlay.show .winner-name {
    transform: scale(1);
    opacity: 1;
}


  /* 奖项选择样式 */
  .prize-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.prize-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 自定义奖项输入框样式 */
.custom-prize-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 100px;
    margin-left: 5px;
    padding: 2px 5px;
    outline: none;
}

.custom-prize-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.custom-prize-input:focus {
    border-bottom-color: #fff;
}

.custom-prize-option {
    display: flex;
    align-items: center;
}

.prize-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prize-option input[type="radio"] {
    margin-right: 5px;
}

/* 中奖记录标签样式 */
.prize-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.latest .prize-tag {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}


 /* 自定义背景样式 */
 .custom-bg-upload {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.custom-bg-upload button {
    transition: all 0.3s ease;
}

.custom-bg-upload button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 背景图片样式 */
body.custom-bg {
    background-image: var(--custom-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 背景面板样式 */
.background-panel {
    position: fixed;
    right: -400px;
    top: 70px;
    width: 400px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.background-panel.show {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header .btn-close {
    filter: invert(1);
}

.background-section h6 {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.gradient-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.background-option {
    height: 100px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.background-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.background-option.active {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.bg-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    text-align: center;
}

/* 自定义背景样式 */
.custom-bg-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
}

.custom-bg-preview {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-bg-preview:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.custom-bg-preview .no-image {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.custom-bg-preview .no-image i {
    font-size: 2em;
    margin-bottom: 8px;
    display: block;
}

.custom-bg-upload {
    text-align: center;
}

.custom-bg-upload button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
}

.custom-bg-upload button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 背景图片样式 */
body.custom-bg {
    background-image: var(--custom-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 隐藏桌面时的样式 */
body.hide-desktop .main-container,
body.hide-desktop .navbar,
body.hide-desktop .tool-stats,
body.hide-desktop .float-buttons button:not(#hideDesktopBtn),
body.hide-desktop .background-panel,
body.hide-desktop .history-panel,
body.hide-desktop .winner-overlay {
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

body.hide-desktop #hideDesktopBtn {
    opacity: 0.3;
    visibility: visible !important;
    transition: all 0.3s ease;
    position: fixed !important;
    z-index: 9999;
}

body.hide-desktop #hideDesktopBtn:hover {
    opacity: 1;
}

#hideDesktopBtn.active {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

#hideDesktopBtn.active i {
    color: #fff;
}

/* 确保背景图片在隐藏桌面时仍然可见 */
body.hide-desktop.custom-bg {
    background-image: var(--custom-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 登录提示样式 */
.background-section .alert {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 15px;
    border-radius: 10px;
}

 /* 隐藏按钮样式
 .hidden-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    cursor: pointer; 
    z-index: 9999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
} */

/* 设置面板样式 */
.setting-panel {
    position: fixed;
    top: 50px;
    left: -320px;
    width: 300px;
    background: rgba(26, 31, 53, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-panel.show {
    left: 10px;
}

.setting-panel h5 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-panel .close-btn {
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 18px;
}

.setting-panel .form-group {
    margin-bottom: 15px;
}

.setting-panel label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 5px;
}

.setting-panel select,
.setting-panel input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-bottom: 10px;
}

.setting-panel .rule-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.setting-panel .rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 5px;
    color: #fff;
}

.setting-panel .rule-item .delete-rule {
    color: #ff4d4f;
    cursor: pointer;
}

.current-round {
    color: #5FE4D1;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(95, 228, 209, 0.1);
    border-radius: 4px;
    text-align: center;
}


  /* hidden-btn样式 */
  .hidden-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    background: transparent;
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    border-radius: 10px;
    /* cursor: pointer; */
    z-index: 9999;
    transition: all 0.3s ease;
}

/* 动态效果样式 */
.matrix-item {
    animation: fadeInScale 0.5s ease;
    transition: all 0.3s ease;
}

.matrix-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 中奖动画效果 */
.matrix-item.winner {
    animation: winnerPulse 1s infinite;
}

@keyframes winnerPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* 按钮悬浮效果 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 历史记录项动画 */
.list-group-item {
    animation: slideIn 0.5s ease;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

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

/* 奖项选择动画 */
.prize-option {
    transition: all 0.3s ease;
}

.prize-option:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

/* 浮动按钮动画 */
.float-buttons .btn {
    animation: floatIn 0.5s ease;
    transition: all 0.3s ease;
}

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

/* 中奖者浮层动画 */
.winner-overlay {
    animation: fadeInBlur 0.5s ease;
}

@keyframes fadeInBlur {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.winner-name {
    animation: popIn 0.5s ease;
}

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

/* 设置面板动画 */
.setting-panel {
    transition: all 0.3s ease;
}

.setting-panel.show {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 规则项动画 */
.rule-item {
    animation: fadeInDown 0.3s ease;
    transition: all 0.3s ease;
}

.rule-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 上传进度条动画 */
.progress-bar {
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #007bff, #00ff88);
    background-size: 200% 100%;
    animation: gradientMove 2s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* 音乐控制按钮动画 */
.music-control .btn {
    animation: rotate 0.3s ease;
}

@keyframes rotate {
    from {
        transform: rotate(-180deg);
    }
    to {
        transform: rotate(0);
    }
}

/* 背景切换动画 */
.background-option {
    transition: all 0.3s ease;
}

.background-option:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* 全局渐变背景动画 */
body {
    transition: background 0.5s ease;
}

/* 抽奖按钮特效 */
#startBtn {
    position: relative;
    overflow: hidden;
}

#startBtn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transform: rotate(45deg);
    animation: btnShine 3s linear infinite;
}

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

/* 添加星星和泡泡容器样式 */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* 星星样式 */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    filter: blur(2px);
    animation: floatStar linear infinite;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8),
               0 0 10px rgba(255, 255, 255, 0.5);
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: inherit;
}

/* 泡泡样式 */
.bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.4), 
        rgba(255, 255, 255, 0.1) 70%,
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.3),
               0 0 15px rgba(255, 255, 255, 0.2);
    animation: floatBubble linear infinite;
    backdrop-filter: blur(1px);
}

/* 星星动画 */
@keyframes floatStar {
    0% {
        transform: translate(var(--tx), 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), -100px) rotate(360deg);
        opacity: 0;
    }
}

/* 泡泡动画 */
@keyframes floatBubble {
    0% {
        transform: translate(0, 100vh) scale(0.3);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), -100px) scale(1);
        opacity: 0;
    }
}
