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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1A1B2E 0%, #2D2F4A 100%);
    color: #FFFFFF;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid rgba(0, 163, 255, 0.3);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00A3FF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00FF88;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 1rem;
    color: #CCCCCC;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(0, 163, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: #00A3FF;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 163, 255, 0.2);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.upload-card p {
    color: #CCCCCC;
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #00A3FF;
    border-radius: 15px;
    padding: 30px;
    background: rgba(0, 163, 255, 0.1);
    transition: all 0.3s ease;
}

.upload-area.dragover {
    background: rgba(0, 163, 255, 0.2);
    border-color: #00D4FF;
}

.upload-btn {
    background: linear-gradient(45deg, #00A3FF, #00D4FF);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 163, 255, 0.4);
}

.upload-hint {
    margin-top: 15px;
    color: #888888;
    font-size: 0.9rem;
}

.file-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 163, 255, 0.1);
    border-radius: 10px;
    text-align: left;
}

.file-info p {
    margin: 5px 0;
    color: #FFFFFF;
}

/* 控制面板样式 */
.control-section {
    margin-bottom: 30px;
}

.control-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.control-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.settings {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.setting-item label {
    font-weight: 600;
    color: #00A3FF;
    display: block;
    margin-bottom: 10px;
}

.setting-item input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rules span {
    color: #CCCCCC;
    font-size: 0.9rem;
}

.start-btn {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 25px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    width: 100%;
    animation: glow 2s infinite;
}

.start-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 107, 0.6); }
}

/* 动画区域样式 */
.animation-section {
    margin-bottom: 30px;
}

.animation-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.drawing-area {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 30px;
}

.current-player {
    text-align: center;
}

.player-card {
    background: rgba(0, 163, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(0, 163, 255, 0.3);
}

.player-avatar {
    font-size: 4rem;
    margin-bottom: 15px;
}

.player-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.player-level {
    color: #00A3FF;
    font-size: 1.1rem;
}

.drawing-animation {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinning-wheel {
    width: 200px;
    height: 200px;
    border: 4px solid #00A3FF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-info {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00A3FF, #00D4FF);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #CCCCCC;
    font-size: 1rem;
}

/* 结果区域样式 */
.results-section {
    margin-bottom: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: 1.8rem;
    color: #FFFFFF;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.export-btn, .print-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover, .print-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.group-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.group-card:nth-child(1) { animation-delay: 0.1s; }
.group-card:nth-child(2) { animation-delay: 0.2s; }
.group-card:nth-child(3) { animation-delay: 0.3s; }
.group-card:nth-child(4) { animation-delay: 0.4s; }
.group-card:nth-child(5) { animation-delay: 0.5s; }
.group-card:nth-child(6) { animation-delay: 0.6s; }

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

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

.group-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #00A3FF;
}

.group-count {
    background: rgba(0, 163, 255, 0.2);
    color: #00A3FF;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.group-stats {
    /* display: flex; */
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: none;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #CCCCCC;
    min-width: 5rem;
}

.stat-value {
    font-size: 0.85rem;
    color: #00A3FF;
    font-weight: 600;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

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

.player-number {
    background: rgba(0, 163, 255, 0.2);
    color: #00A3FF;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.player-name {
    font-weight: 500;
    flex: 1;
}

.player-level-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.level-high {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

.level-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.level-low {
    background: rgba(0, 163, 255, 0.2);
    color: #00A3FF;
}

.level-basic {
    background: rgba(108, 117, 125, 0.2);
    color: #6C757D;
}

.player-team-badge {
    background: rgba(111, 66, 193, 0.2);
    color: #6F42C1;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

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

/* 组切换动画 */
.group-transition {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 27, 46, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.3s ease-out;
}

.transition-content {
    text-align: center;
    animation: bounceIn 0.5s ease-out;
}

.transition-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.transition-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00A3FF;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 闪烁动画 */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 163, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 163, 255, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 163, 255, 0.5);
    }
}

/* 消息提示样式 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message-toast.show {
    transform: translateX(0);
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.message-success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border-left: 4px solid #28a745;
}

.message-error {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-left: 4px solid #dc3545;
}

.message-warning {
    background: rgba(255, 193, 7, 0.9);
    color: #212529;
    border-left: 4px solid #ffc107;
}

.message-icon {
    font-size: 1.2rem;
}

.message-text {
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .settings {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .drawing-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .groups-container {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .message-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .message-toast.show {
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #00A3FF;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}