* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

.game-container {
    display: grid;
    grid-template-columns: 300px 1fr 200px;
    gap: 30px;
    align-items: start;
}

.game-info {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-info {
    margin-bottom: 25px;
}

.player {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.player.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.player-avatar {
    font-size: 2rem;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.player-details {
    flex: 1;
}

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

.player-status {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.board-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#board {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(31, 38, 135, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

#board:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 70px rgba(31, 38, 135, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.board-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.game-message {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.game-message.show {
    opacity: 1;
    transform: scale(1);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-info {
        order: 2;
    }
    
    .controls {
        order: 3;
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    #board {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        margin-bottom: 15px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .game-container {
        gap: 15px;
    }
    
    .game-info {
        padding: 15px;
    }
    
    .player {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .player-avatar {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .player-name {
        font-size: 1rem;
    }
    
    .player-status {
        font-size: 0.8rem;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    #board {
        max-width: 350px;
        border-radius: 15px;
    }
    
    .controls {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 5px;
    }
    
    .header {
        margin-bottom: 10px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .game-container {
        grid-template-columns: 200px 1fr 150px;
        gap: 15px;
        align-items: center;
    }
    
    .game-info {
        padding: 15px;
    }
    
    .player {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .player-avatar {
        font-size: 1.2rem;
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    .player-name {
        font-size: 0.9rem;
    }
    
    .player-status {
        font-size: 0.7rem;
    }
    
    .stats {
        gap: 8px;
    }
    
    .stat-item {
        padding: 8px;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    #board {
        max-width: 300px;
    }
    
    .controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }
}

/* 防止移动端滚动和缩放 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    #board {
        touch-action: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-container {
    animation: fadeIn 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 