Area_and_Perimeter / style.css
Pp's picture
Update style.css
b419bd3 verified
raw
history blame
2.55 kB
/* Base layout */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 20px;
background-color: #f9f9f9;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
box-sizing: border-box;
color: #333;
}
h1 {
font-size: 26px;
margin: 16px 0;
color: #222;
text-align: center;
}
/* Main container */
.game-container {
border: 1px solid #e0e0e0;
border-radius: 16px;
padding: 24px;
background-color: #fff;
box-shadow: 0 8px 16px rgba(0,0,0,0.05);
width: 100%;
max-width: 880px;
}
/* Controls */
.controls {
margin: 16px 0;
display: flex;
justify-content: center;
gap: 12px;
flex-wrap: wrap;
}
button {
padding: 10px 18px;
cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
font-weight: 500;
font-size: 15px;
background-color: #f5f5f5;
color: #333;
transition: all 0.2s ease-in-out;
}
button:hover {
background-color: #eaeaea;
transform: translateY(-1px);
}
.mode-active {
border: 2px solid #007aff;
background-color: #e6f0ff;
color: #007aff;
}
/* Layout: grid + stats side by side */
.grid-and-stats {
display: flex;
gap: 20px;
justify-content: center;
align-items: flex-start;
flex-wrap: wrap;
}
/* Grid wrapper */
.grid-wrapper {
width: 420px;
aspect-ratio: 1 / 1;
background-color: #f0f0f0;
border: 2px solid #d0d0d0;
border-radius: 12px;
box-shadow: inset 0 0 6px rgba(0,0,0,0.05);
padding: 8px;
display: flex;
align-items: stretch;
justify-content: stretch;
}
/* Grid */
.grid {
flex: 1;
display: grid;
grid-template-columns: repeat(15, 1fr);
grid-template-rows: repeat(15, 1fr);
gap: 2px;
background-color: #ccc;
border-radius: 8px;
}
/* Cells */
.cell {
width: 100%;
height: 100%;
aspect-ratio: 1 / 1;
background-color: #fff;
cursor: pointer;
transition: background-color 0.2s ease;
}
.cell:hover {
background-color: #f0f0f0;
}
.cell.filled {
background-color: #007aff;
border: 1px solid #005bb5;
}
/* Stats on the right */
.stats {
display: flex;
flex-direction: column;
gap: 14px;
font-size: 16px;
justify-content: center;
min-width: 160px;
}
.stat-box {
background-color: #f2f2f2;
padding: 12px 16px;
border-radius: 8px;
border: 1px solid #ddd;
}
.stat-value {
font-size: 20px;
font-weight: 600;
color: #444;
}