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; } #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; } .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; } @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; } .solver-panel-header, .solver-speed { grid-template-columns: 1fr; display: grid; } .solver-step-info, .solver-speed-value { justify-self: start; } }