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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 700px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
}

/* Game Section */
.game-section {
    margin-bottom: 30px;
}

.choices {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.choice-btn {
    background: #f0f0f0;
    border: 3px solid #ddd;
    padding: 20px 25px;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.choice-btn:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.choice-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Result Section */
.result-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.result-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.player-choice,
.computer-choice {
    flex: 1;
}

.player-choice h3,
.computer-choice h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.player-choice p,
.computer-choice p {
    font-size: 3em;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs {
    font-size: 1.5em;
    font-weight: bold;
    color: #999;
    padding: 0 15px;
}

.winner-message {
    font-size: 1.3em;
    font-weight: bold;
    min-height: 30px;
}

.winner-message.win {
    color: #27ae60;
}

.winner-message.lose {
    color: #e74c3c;
}

.winner-message.tie {
    color: #f39c12;
}

/* History Section */
.history-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.history-container {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.95em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item.win {
    border-left-color: #27ae60;
}

.history-item.lose {
    border-left-color: #e74c3c;
}

.history-item.tie {
    border-left-color: #f39c12;
}

.round-number {
    font-weight: bold;
    color: #667eea;
    margin-right: 10px;
}

.move-info {
    flex: 1;
}

.result-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.result-badge.win {
    background: #27ae60;
}

.result-badge.lose {
    background: #e74c3c;
}

.result-badge.tie {
    background: #f39c12;
}

.empty-history {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

/* Scrollbar Styling */
.history-container::-webkit-scrollbar {
    width: 6px;
}

.history-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .container {
        padding: 20px;
    }

    .choice-btn {
        padding: 15px 20px;
        font-size: 1em;
    }

    .result-container {
        flex-direction: column;
        gap: 15px;
    }

    .vs {
        transform: rotate(90deg);
    }
}

/* Tournament Info Section */
.tournament-info {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tournament-info h2 {
    font-size: 1.8em;
    margin: 0;
}

.max-rounds {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}