Files
acht-damen-tuerme-problem/app/static/css/dashboard.css
T

280 lines
4.2 KiB
CSS

body {
margin: 0;
font-family: Arial, sans-serif;
background: #f5f7fa;
}
/* 🔝 Navbar */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background: #1e293b;
color: white;
padding: 15px 30px;
}
.navbar a {
color: white;
margin-left: 15px;
text-decoration: none;
}
.navbar a:hover {
text-decoration: underline;
}
/* 📦 Layout */
.container {
max-width: 900px;
margin: 30px auto;
padding: 10px;
}
/* 📇 Cards */
.card {
background: white;
padding: 20px;
margin-bottom: 25px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.game-card {
text-align: center;
}
.board {
overflow-x: auto;
padding-bottom: 8px;
}
/* ♟️ Board */
.board-grid {
--label-size: 30px;
--cell-size: 60px;
display: grid;
grid-template-columns: var(--label-size) repeat(var(--board-size, 8), var(--cell-size));
grid-template-rows: var(--label-size) repeat(var(--board-size, 8), var(--cell-size));
margin: 20px auto;
width: max-content;
border: 6px solid #1e293b;
border-radius: 10px;
overflow: hidden;
max-width: 100%;
}
.label {
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
background: #aec8eb;
color: #1e293b;
width: var(--label-size);
height: var(--label-size);
font-size: 14px;
}
.cell {
width: var(--cell-size);
height: var(--cell-size);
display: flex;
align-items: center;
justify-content: center;
font-size: calc(var(--cell-size) * 0.5);
cursor: pointer;
transition: 0.2s;
}
.cell:hover {
transform: scale(1.05);
}
.white {
background: #e2e8f0;
}
.black {
background: #475569;
color: white;
}
.invalid {
background: #ef4444 !important;
}
/* 🎛️ Buttons */
.controls {
margin-top: 15px;
}
.btn {
padding: 10px 15px;
margin: 5px;
border: none;
border-radius: 8px;
background: #3b82f6;
color: white;
cursor: pointer;
}
.btn:hover {
background: #2563eb;
}
.btn.secondary {
background: #64748b;
}
.btn.secondary:hover {
background: #475569;
}
.btn.danger {
background: #ef4444;
}
.btn.danger:hover {
background: #dc2626;
}
#queenList {
list-style: none;
padding: 0;
}
#queenList li {
padding: 5px;
background: #f1f5f9;
margin: 4px 0;
border-radius: 6px;
}
.mode-switch {
margin-bottom: 15px;
}
.mode-switch .btn {
margin: 5px;
}
.btn.active {
background: #22c55e;
}
.board-size-info {
margin: 0 0 10px;
color: #475569;
}
.sidebar {
position: fixed;
top: 0;
right: 0;
width: min(320px, 85vw);
height: 100vh;
padding: 24px;
background: white;
box-shadow: -10px 0 24px rgba(15, 23, 42, 0.18);
transform: translateX(100%);
transition: transform 0.25s ease;
z-index: 30;
}
.sidebar.open {
transform: translateX(0);
}
.save-points-sidebar {
width: min(380px, 92vw);
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.sidebar-close {
margin: 0;
}
.sidebar-label {
display: block;
margin-top: 18px;
margin-bottom: 8px;
font-weight: bold;
}
.sidebar input[type="range"] {
width: 100%;
}
.sidebar-size-row {
margin: 12px 0 18px;
font-size: 18px;
}
.sidebar-hint {
color: #64748b;
font-size: 14px;
}
.save-points-list {
display: grid;
gap: 12px;
margin-top: 18px;
}
.save-point-card {
border: 1px solid #dbe4ee;
border-radius: 10px;
padding: 14px;
background: #f8fafc;
}
.save-point-card h4 {
margin: 0 0 8px;
color: #1e293b;
}
.save-point-meta {
margin: 4px 0;
color: #475569;
font-size: 14px;
}
.save-point-preview {
margin: 10px 0 0;
color: #334155;
font-size: 14px;
word-break: break-word;
}
.sidebar-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.3);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
z-index: 20;
}
.sidebar-backdrop.visible {
opacity: 1;
pointer-events: auto;
}
@media (max-width: 720px) {
.container {
padding: 12px;
}
.navbar {
padding: 15px 18px;
}
}