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

732 lines
11 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;
}
.nav-right {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.nav-logout-form {
margin: 0 0 0 15px;
}
.nav-link-button {
padding: 0;
border: none;
background: none;
color: white;
font: inherit;
cursor: pointer;
}
.nav-link-button: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);
}
.flash-stack {
display: grid;
gap: 12px;
margin-bottom: 18px;
}
.flash-message {
margin: 0;
padding: 12px 14px;
border-radius: 10px;
}
.flash-message.success {
color: #166534;
background: #dcfce7;
}
.flash-message.info {
color: #1d4ed8;
background: #dbeafe;
}
.flash-message.error {
color: #b91c1c;
background: #fee2e2;
}
.game-card {
text-align: center;
}
.game-card-header {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}
.game-card-header h2 {
margin: 0;
}
.info-button {
width: 38px;
height: 38px;
border: none;
border-radius: 999px;
background: #dbeafe;
color: #1d4ed8;
font-size: 20px;
font-weight: bold;
cursor: pointer;
}
.info-button:hover {
background: #bfdbfe;
}
.game-stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
margin: 18px 0 12px;
}
.game-stat-card {
padding: 14px 16px;
border-radius: 12px;
background: #f8fafc;
border: 1px solid #dbe4ee;
text-align: left;
}
.game-stat-label {
margin: 0 0 8px;
font-size: 14px;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.game-stat-value {
margin: 0;
font-size: 26px;
font-weight: bold;
color: #1e293b;
font-variant-numeric: tabular-nums;
}
.game-stat-status {
font-size: 20px;
}
#statusMessage {
min-height: 24px;
margin: 0 0 8px;
font-weight: bold;
}
.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);
}
.cell.solver-place {
box-shadow: inset 0 0 0 4px #22c55e;
animation: solverPulse 0.35s ease;
}
.cell.solver-remove {
box-shadow: inset 0 0 0 4px #f59e0b;
animation: solverPulse 0.35s ease;
}
.cell.solver-solution {
box-shadow: inset 0 0 0 4px #2563eb;
animation: solverPulse 0.35s ease;
}
.white {
background: #e2e8f0;
}
.black {
background: #475569;
color: white;
}
.invalid {
background: #ef4444 !important;
}
/* 🎛️ Buttons */
.controls {
margin-top: 15px;
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 10px;
}
.btn {
padding: 10px 15px;
margin: 5px;
border: none;
border-radius: 8px;
background: #3b82f6;
color: white;
cursor: pointer;
}
.btn:hover {
background: #2563eb;
}
.btn:disabled,
.btn:disabled:hover {
background: #94a3b8;
cursor: not-allowed;
}
.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;
}
.solver-panel {
margin-top: 12px;
padding: 16px;
border-radius: 12px;
border: 1px solid #dbe4ee;
background: #f8fafc;
text-align: left;
}
.solver-panel-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
}
.solver-panel h3 {
margin: 0 0 6px;
color: #1e293b;
}
.solver-message {
margin: 0;
color: #475569;
}
.solver-step-info {
margin: 0;
padding: 6px 10px;
border-radius: 999px;
background: #dbeafe;
color: #1d4ed8;
font-size: 14px;
font-weight: bold;
white-space: nowrap;
}
.solver-controls {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 14px;
}
.solver-controls .btn,
.controls .btn {
margin: 0;
}
.solver-speed {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 12px;
margin-top: 14px;
}
.solver-speed input[type="range"] {
width: 100%;
}
.solver-speed-label {
font-weight: bold;
color: #334155;
}
.solver-speed-value {
min-width: 62px;
text-align: right;
color: #475569;
font-variant-numeric: tabular-nums;
}
.board-size-info {
margin: 0 0 10px;
color: #475569;
}
.sidebar {
position: fixed;
top: 0;
right: 0;
width: min(320px, 85vw);
height: 100vh;
padding: 24px;
box-sizing: border-box;
background: white;
box-shadow: -10px 0 24px rgba(15, 23, 42, 0.18);
transform: translateX(100%);
transition: transform 0.25s ease;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain;
z-index: 30;
}
.sidebar.open {
transform: translateX(0);
}
.save-points-sidebar {
width: min(380px, 92vw);
}
.save-sidebar {
width: min(360px, 90vw);
}
.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-input {
width: 100%;
padding: 10px 12px;
border: 1px solid #cbd5e1;
border-radius: 8px;
font: inherit;
box-sizing: border-box;
background: #fff;
}
.sidebar-textarea {
resize: vertical;
min-height: 96px;
}
.sidebar-checkbox {
display: flex;
align-items: center;
gap: 10px;
margin: 16px 0 18px;
color: #334155;
}
.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-filters {
display: grid;
gap: 8px;
margin-top: 18px;
padding-bottom: 16px;
border-bottom: 1px solid #e2e8f0;
}
.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;
}
.save-point-note {
margin: 10px 0 0;
color: #475569;
font-size: 14px;
}
.save-point-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 14px;
}
.save-point-actions .btn {
margin: 0;
}
.inline-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.inline-actions form {
margin: 0;
}
.inline-actions .btn {
margin: 0;
}
.history-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
margin-bottom: 14px;
}
.history-header h3 {
margin: 0;
}
.history-subtitle {
margin: 6px 0 0;
color: #64748b;
}
.history-table-wrapper {
overflow-x: auto;
}
.history-table {
width: 100%;
border-collapse: collapse;
min-width: 720px;
}
.history-table th,
.history-table td {
padding: 12px 10px;
border-bottom: 1px solid #e2e8f0;
text-align: left;
}
.history-table th {
color: #334155;
font-size: 14px;
}
.history-table td {
color: #475569;
font-size: 14px;
}
.history-empty {
color: #64748b;
text-align: center !important;
}
.btn.ghost {
background: #e2e8f0;
color: #1e293b;
}
.btn.ghost:hover {
background: #cbd5e1;
}
.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;
}
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.42);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
z-index: 40;
}
.modal-backdrop.visible {
opacity: 1;
pointer-events: auto;
}
.modal {
position: fixed;
top: 50%;
left: 50%;
width: min(620px, calc(100vw - 32px));
max-height: min(82vh, 720px);
padding: 24px;
box-sizing: border-box;
background: white;
border-radius: 18px;
box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
transform: translate(-50%, -48%);
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease, transform 0.25s ease;
overflow-y: auto;
z-index: 50;
}
.modal.open {
opacity: 1;
pointer-events: auto;
transform: translate(-50%, -50%);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
}
.modal-header h3 {
margin: 0;
}
.modal-content {
margin-top: 16px;
color: #334155;
text-align: left;
}
.modal-content h4 {
margin: 16px 0 8px;
color: #1e293b;
}
.modal-content p {
margin: 0;
line-height: 1.6;
}
@keyframes solverPulse {
0% {
transform: scale(0.97);
}
50% {
transform: scale(1.03);
}
100% {
transform: scale(1);
}
}
@media (max-width: 720px) {
.container {
padding: 12px;
}
.navbar {
padding: 15px 18px;
}
.nav-logout-form {
margin-left: 0;
}
.solver-panel-header,
.solver-speed {
grid-template-columns: 1fr;
display: grid;
}
.game-stats {
grid-template-columns: 1fr;
}
.history-header,
.modal-header {
grid-template-columns: 1fr;
display: grid;
}
.solver-step-info,
.solver-speed-value {
justify-self: start;
}
}