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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.player-area {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    min-height: 500px;
}

.player-area h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.draw-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.draw-btn:active {
    transform: translateY(0);
}

.draw-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pokemon-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.pokemon-card.has-pokemon {
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.pokemon-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.placeholder {
    font-size: 3rem;
    color: #999;
}

.pokemon-name {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #4ecdc4;
}

.stat-item.total-score {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    border-left: none;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
    color: #2d3748;
}

.total-score .stat-value {
    color: white;
}

.vs-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.vs-text {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 10px;
    margin-top: 10px;
    opacity: 0;
    transition: all 0.5s ease;
}

.result.show {
    opacity: 1;
    transform: scale(1.05);
}

.result.win {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    animation: winGlow 1s ease-in-out;
}

.result.lose {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    animation: loseShake 0.5s ease-in-out;
}

@keyframes winGlow {
    0% { box-shadow: 0 0 5px rgba(78, 205, 196, 0.5); }
    50% { box-shadow: 0 0 20px rgba(78, 205, 196, 0.8); }
    100% { box-shadow: 0 0 5px rgba(78, 205, 196, 0.5); }
}

@keyframes loseShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.controls {
    text-align: center;
}

.reset-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 相克信息高亮 */
.stat-item .affinity-bad {
    color: #e53e3e; /* red-600 */
    font-weight: 700;
}

.stat-item .affinity-good {
    color: #2f855a; /* green-700 */
    font-weight: 700;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .vs-area {
        order: -1;
        margin: 20px 0;
    }
    
    .vs-text {
        transform: rotate(90deg);
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .player-area {
        min-height: auto;
    }
    
    .pokemon-image {
        width: 100px;
        height: 100px;
    }
    
    .placeholder {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .player-area {
        padding: 15px;
    }
    
    .draw-btn, .reset-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .pokemon-stats {
        gap: 5px;
    }
    
    .stat-item {
        padding: 3px 8px;
        font-size: 0.9rem;
    }
}
