* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: url('1920x1080.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    background-size: 100% 100%;
}

/* 手机设备检测和优化 */
@media (max-width: 768px) and (orientation: portrait) {
    body {
        background: url('1080x1920.jpg') center/cover no-repeat fixed;
        background-size: 100% 100%;
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        margin: 10px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .wheel-container {
        width: 420px;
        height: 420px;
        margin: 0 auto 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
    
    #wheelCanvas {
        width: 420px;
        height: 420px;
        display: block;
    }
    
    .wheel-pointer {
        right: -20px;
    }
    
    .input-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    #usernameInput {
        padding: 12px;
        font-size: 14px;
    }
    
    .input-group button {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
    
    .batch-import {
        padding: 15px;
        margin: 20px 0;
    }
    
    .import-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .import-group button {
        width: 100%;
        margin-bottom: 5px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .user-list {
        padding: 15px;
        min-height: 100px;
    }
    
    .user-item {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    #startBtn {
        padding: 15px 25px;
        font-size: 16px;
        border-radius: 25px;
    }
    
    .result-section {
        padding: 25px;
        margin-top: 20px;
    }
    
    .winner {
        font-size: 1.6em;
        padding: 20px;
        margin: 20px 0;
    }
    
    .result-section button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s infinite linear;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.8em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    background: linear-gradient(45deg, #ffffff, #e6e6e6, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.6em;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

h3 {
    color: #f0f0f0;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* 导航按钮样式 */
.navigation {
    margin-bottom: 20px;
    text-align: left;
}

.nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.primary-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.primary-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
}

.primary-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
}

.secondary-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 30px;
    padding: 25px;
    background: transparent;
    border-radius: 15px;
    border: none;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#usernameInput {
    flex: 1;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

#usernameInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-group button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

/* 批量导入样式 */
.batch-import {
    margin: 25px 0;
    padding: 20px;
    background: transparent;
    border-radius: 10px;
    border: none;
}

.import-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.import-group button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.import-group button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.import-btn {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

#import-btn:hover {
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3) !important;
}

#import-group span {
    color: #666;
    font-size: 14px;
}

.import-tip {
    color: #999;
    font-size: 12px;
    text-align: center;
    margin: 0;
}

.user-list {
    min-height: 120px;
    border: none;
    border-radius: 10px;
    padding: 20px;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.user-list p {
    color: #999;
    text-align: center;
    width: 100%;
    margin: 0;
}

.user-item {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 8px 16px;
    margin: 4px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid #90caf9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 转盘区域样式 */
.wheel-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: transparent;
    border-radius: 15px;
    border: none;
    position: relative;
}

.wheel-container {
    position: relative;
    width: 750px;
    height: 750px;
    margin: 0 auto 30px;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(0, 0, 0, 0.3);
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.wheel-pointer {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
}

.pointer-arrow {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 25px solid #cccccc;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.pointer-base {
    display: none;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    animation: sparkle 2s infinite;
    opacity: 0;
}

#sparkle1 { top: 50px; left: 50px; animation-delay: 0s; }
#sparkle2 { top: 50px; right: 50px; animation-delay: 0.7s; }
#sparkle3 { bottom: 50px; left: 180px; animation-delay: 1.4s; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* 开始抽奖按钮样式 */
#startBtn {
    background: linear-gradient(135deg, #28a745, #218838) !important;
}

#startBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #1e7e34) !important;
}

#startBtn:disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    cursor: not-allowed;
}

/* 结果区域样式 */
.result-section {
    text-align: center;
    padding: 35px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 15px;
    margin-top: 25px;
    border: 3px solid #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.winner {
    font-size: 2.2em;
    font-weight: bold;
    color: #d35400;
    margin: 25px 0;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid #ffc107;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.result-section button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.result-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(23, 162, 184, 0.4);
}

/* 通用响应式设计（横屏手机） */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .wheel-container {
        width: 375px;
        height: 375px;
    }
    
    #wheelCanvas {
        width: 375px;
        height: 375px;
    }
    
    .input-group {
        flex-direction: row;
        gap: 8px;
    }
    
    #usernameInput {
        font-size: 14px;
        padding: 10px;
    }
    
    .input-group button {
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* 屏幕录制控制样式 */
.screen-recorder-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.record-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.record-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

.record-btn.recording {
    background: linear-gradient(135deg, #28a745, #218838);
    animation: pulse 1.5s infinite;
}

.record-btn.recording:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
}

.record-icon {
    font-size: 12px;
    animation: none;
}

.record-btn.recording .record-icon {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.recording-status {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.recording-time {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 响应式设计 - 移动设备 */
@media (max-width: 768px) {
    .screen-recorder-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .record-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .recording-status {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinning {
    animation: spin 3s cubic-bezier(0.17, 0.67, 0.83, 0.67) infinite;
}
