Files
tic-tac-toe-ui/src/styles.css

134 lines
2.1 KiB
CSS

body {
font-family: sans-serif;
background: #eaeef3;
display: flex;
justify-content: center;
margin: 0;
color: #222;
}
.game-container {
text-align: center;
padding: 20px;
}
.board {
width: 300px;
height: 300px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
margin: 20px auto;
}
.square {
background: white;
border-radius: 10px;
border: 2px solid #444;
font-size: 2.2rem;
font-weight: bold;
cursor: pointer;
height: 100px;
width: 100px;
display: flex;
align-items: center;
justify-content: center;
transition: 0.15s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.square:hover {
background: #f1f1f1;
transform: scale(1.04);
}
.status {
font-size: 1.6rem;
margin-bottom: 15px;
font-weight: bold;
color: #222;
}
.reset-btn {
padding: 12px 26px;
background: #3558d8;
color: white;
border: none;
cursor: pointer;
font-size: 1rem;
border-radius: 8px;
transition: 0.2s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.reset-btn:hover {
background: #2449c7;
transform: translateY(-2px);
}
.leaderboard {
width: 300px;
margin: 25px auto;
padding: 15px 20px;
background: white;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
font-family: sans-serif;
}
/* Leaderboard title */
.leaderboard-title {
margin: 0 0 15px 0;
font-size: 1.4rem;
font-weight: 700;
text-align: center;
color: #222;
}
/* Each row */
.leaderboard-row {
display: flex;
align-items: center;
padding: 10px 8px;
background: #f7f9fc;
border-radius: 8px;
margin-bottom: 8px;
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
/* Empty state */
.leaderboard-empty {
padding: 12px 0;
text-align: center;
color: #777;
font-size: 1rem;
}
/* Rank number */
.leaderboard-rank {
width: 28px;
font-size: 1.2rem;
font-weight: 700;
color: #3558d8;
}
/* Username */
.leaderboard-name {
flex: 1;
margin-left: 10px;
font-weight: 500;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Score value */
.leaderboard-score {
width: 40px;
text-align: right;
font-weight: 700;
color: #111;
}