Area_and_Perimeter / style.css
Pp's picture
Update style.css
edf77e3 verified
/* Base */
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;
}
/* 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: 1100px;
}
/* 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 */
.main-layout {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 32px;
align-items: start;
}
/* Definitions (Left Column) */
.definitions {
flex: 1;
min-width: 200px;
max-width: 260px;
}
.definitions h2 {
font-size: 18px;
margin-bottom: 6px;
color: #007aff;
}
.definitions p {
font-size: 15px;
line-height: 1.5;
margin-bottom: 18px;
color: #444;
}
/* Grid */
.grid-wrapper {
width: 400px;
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 {
flex: 1;
display: grid;
grid-template-columns: repeat(15, 1fr);
grid-template-rows: repeat(15, 1fr);
gap: 2px;
background-color: #ccc;
border-radius: 8px;
}
.cell {
width: 100%;
aspect-ratio: 1 / 1;
background-color: #fff;
cursor: pointer;
transition: background-color 0.2s ease;
box-sizing: border-box;
}
.cell:hover {
background-color: #f0f0f0;
}
.cell.filled {
background-color: #007aff;
border: 1px solid #005bb5;
box-sizing: border-box;
}
/* Stats (Right Column) */
.stats {
display: flex;
flex-direction: column;
gap: 16px;
justify-content: flex-start;
align-items: flex-start;
min-width: 180px;
flex-shrink: 0;
}
.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;
}