/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.title i {
    font-size: 2rem;
    color: #e74c3c;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: #7f8c8d;
}

/* Score Board */
.score-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.score-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.score-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
}

.score {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.score-card.player .score {
    color: #27ae60;
}

.score-card.computer .score {
    color: #e74c3c;
}

.score-card.ties .score {
    color: #f39c12;
}

/* Game Area */
.game-area {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

/* Result Section */
.result-section {
    text-align: center;
    margin-bottom: 30px;
}

.result-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    min-height: 2.5rem;
}

.choices-made {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.choice {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.choice-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.choice-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
    border: 3px solid #bdc3c7;
}

.choice-icon.rock {
    background: #8B4513;
    color: white;
    border-color: #654321;
}

.choice-icon.paper {
    background: #F5F5DC;
    color: #8B4513;
    border-color: #D2B48C;
}

.choice-icon.scissors {
    background: #C0C0C0;
    color: white;
    border-color: #808080;
}

.vs {
    font-size: 1.5rem;
    font-weight: 700;
    color: #666;
    padding: 0 20px;
}

/* Choices Section */
.choices-section {
    text-align: center;
    margin-bottom: 30px;
}

.choices-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

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

.choice-btn {
    width: 120px;
    height: 120px;
    border: none;
    border-radius: 10px;
    background: #3498db;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.choice-btn:hover {
    background: #2980b9;
}

.choice-btn.rock {
    background: #8B4513;
}

.choice-btn.paper {
    background: #D2B48C;
    color: #8B4513;
}

.choice-btn.scissors {
    background: #C0C0C0;
}

/* Controls Section */
.controls-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #229954;
}

.btn-secondary {
    background: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background: #c0392b;
}

/* History Section */
.history-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e8ed;
}

.history-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

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

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #ddd;
}

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

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

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

.history-choices {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-result {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.history-result.win {
    background: #27ae60;
    color: white;
}

.history-result.lose {
    background: #e74c3c;
    color: white;
}

.history-result.tie {
    background: #f39c12;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    background: #3498db;
    color: white;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

.close-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 25px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.rule-item i {
    font-size: 1.5rem;
    color: #3498db;
    width: 30px;
}

.rule-note {
    text-align: center;
    font-weight: 600;
    color: #3498db;
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 5px;
}

.winner-modal .modal-header {
    background: #27ae60;
}

.winner-announcement {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.final-score {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .score-board {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-area {
        padding: 20px;
    }
    
    .choices-container {
        gap: 15px;
    }
    
    .choice-btn {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }
    
    .choices-made {
        gap: 20px;
    }
    
    .choice-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .vs {
        padding: 0 10px;
        font-size: 1.2rem;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .choice-btn {
        width: 80px;
        height: 80px;
        font-size: 1.2rem;
    }
    
    .choices-made {
        flex-direction: column;
        gap: 15px;
    }
    
    .vs {
        transform: rotate(90deg);
    }
    
    .history-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Focus and Accessibility */
.choice-btn:focus,
.btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
