155 lines
2.4 KiB
CSS
155 lines
2.4 KiB
CSS
* {
|
|
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;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.container {
|
|
background: white;
|
|
border-radius: 15px;
|
|
padding: 30px;
|
|
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
|
text-align: center;
|
|
max-width: 500px;
|
|
width: 90%;
|
|
}
|
|
|
|
h1 {
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
font-size: 2.5em;
|
|
}
|
|
|
|
.game-info {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
margin-bottom: 20px;
|
|
font-size: 1.2em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.current-player {
|
|
color: #667eea;
|
|
}
|
|
|
|
.game-status {
|
|
color: #764ba2;
|
|
}
|
|
|
|
.score-board {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
margin-bottom: 20px;
|
|
padding: 10px;
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.player-score, .draws {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.game-board {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
grid-gap: 10px;
|
|
max-width: 300px;
|
|
margin: 0 auto 20px;
|
|
}
|
|
|
|
.cell {
|
|
width: 90px;
|
|
height: 90px;
|
|
border: 2px solid #ddd;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 2em;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
background: #fff;
|
|
}
|
|
|
|
.cell:hover {
|
|
background: #f0f0f0;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.cell.x {
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.cell.o {
|
|
color: #3498db;
|
|
}
|
|
|
|
.winning-cell {
|
|
background-color: #d4edda;
|
|
animation: pulse 0.6s ease-in-out;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.1); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
.game-controls {
|
|
display: flex;
|
|
gap: 10px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn {
|
|
padding: 12px 24px;
|
|
font-size: 1em;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
background: #667eea;
|
|
color: white;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: #5a6fd8;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Responsive design */
|
|
@media (max-width: 500px) {
|
|
.container {
|
|
padding: 20px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2em;
|
|
}
|
|
|
|
.cell {
|
|
width: 80px;
|
|
height: 80px;
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
.game-info {
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
} |