@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    scroll-behavior: smooth;
}

#root {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-container {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-align: center;
    width: 90%;
    max-width: 1200px;
    border: 1px solid #333;
}

h1 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2em;
    margin-bottom: 20px;
}

.main-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scores {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: 300;
}

.buttons {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

button {
    padding: 12px 25px;
    font-size: 1em;
    width: 200px; /* Give buttons a consistent width */
    max-width: 100%;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: 700;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.turn-indicator {
    margin: 15px 0;
    font-size: 1.2em;
    color: #aaa;
}

.moves-history {
    margin-top: 15px;
    width: 100%;
}

.moves-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
    height: 35px;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.move {
    flex-grow: 1;
    height: 100%;
    border-right: 1px solid #333;
    transition: background-color 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}
.move:last-child {
    border-right: none;
}

.move.COOPERATE { background-color: #28a745; }
.move.DEFECT { background-color: #dc3545; }

.game-over {
    margin-top: 20px;
    font-size: 1.8em;
    color: #00ffdd;
}

.game-over h2 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.game-over h3 {
    font-weight: 300;
    color: #e0e0e0;
    font-size: 1em;
}

.game-over button {
    margin-top: 15px;
    background-color: #28a745;
}

.game-over button:hover {
    background-color: #218838;
}

.scoring-instructions {
    margin: 0;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    text-align: left;
    flex-grow: 1;
}

.scoring-instructions h3 {
    margin-top: 0;
    color: #ffffff;
    text-align: center;
    font-size: 1.1em;
}

.scoring-instructions ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.scoring-instructions li {
    margin-bottom: 8px;
    font-weight: 300;
    font-size: 0.9em;
}

.scoring-instructions li:last-child {
    margin-bottom: 0;
}

.fair-play-note {
    margin: 15px 0 0 0;
    padding: 15px;
    background-color: #2c2c2c;
    border-left: 4px solid #007bff;
    color: #ccc;
    font-size: 0.9em;
    text-align: left;
}

.fair-play-note strong {
    color: #ffffff;
}

.fair-play-note em {
    color: #00ffdd;
    font-style: normal;
}

.result-message {
    margin-top: 15px;
    font-size: 1.1em;
    color: #bb86fc;
    font-weight: bold;
}
