init
This commit is contained in:
300
src/styles/board.css
Normal file
300
src/styles/board.css
Normal file
@@ -0,0 +1,300 @@
|
||||
/* ==========================================================================
|
||||
BOARD & WORD BUILDER STYLES
|
||||
========================================================================== */
|
||||
|
||||
/* Active Word Construction Tray */
|
||||
.word-builder-wrapper {
|
||||
margin: 6px 0 10px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.word-builder {
|
||||
min-height: 52px;
|
||||
background: var(--bg-surface);
|
||||
backdrop-filter: blur(18px);
|
||||
-webkit-backdrop-filter: blur(18px);
|
||||
border: 1.5px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 4px 8px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
||||
transition: all var(--transition-normal);
|
||||
}
|
||||
|
||||
.word-builder.has-tiles {
|
||||
border-color: var(--border-highlight);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.word-builder.invalid-shake {
|
||||
animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||||
border-color: var(--accent-danger);
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
10%, 90% { transform: translate3d(-2px, 0, 0); }
|
||||
20%, 80% { transform: translate3d(4px, 0, 0); }
|
||||
30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
|
||||
40%, 60% { transform: translate3d(6px, 0, 0); }
|
||||
}
|
||||
|
||||
/* Selected Tiles in Tray */
|
||||
.active-tiles-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
min-height: 48px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.active-tiles-container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.builder-placeholder {
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.92rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
/* Active Tile Chip */
|
||||
.active-tile-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8px 14px;
|
||||
background: var(--tile-bg);
|
||||
color: var(--text-primary);
|
||||
border: 1.5px solid var(--tile-border);
|
||||
border-radius: var(--radius-md);
|
||||
font-size: 1.12rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.03em;
|
||||
box-shadow: var(--tile-shadow);
|
||||
cursor: grab;
|
||||
position: relative;
|
||||
transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
|
||||
animation: chipInsert 0.22s var(--ease-spring);
|
||||
}
|
||||
|
||||
.active-tile-chip:active {
|
||||
cursor: grabbing;
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
.active-tile-chip.dragging {
|
||||
opacity: 0.4;
|
||||
transform: scale(0.92);
|
||||
}
|
||||
|
||||
.active-tile-chip.drag-over {
|
||||
border-color: var(--accent-blue);
|
||||
transform: scale(1.06);
|
||||
}
|
||||
|
||||
.active-tile-chip .remove-icon {
|
||||
margin-left: 6px;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-tertiary);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
@keyframes chipInsert {
|
||||
0% { transform: scale(0.7) translateY(8px); opacity: 0; }
|
||||
100% { transform: scale(1) translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* Action controls inside the tray */
|
||||
.builder-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.btn-icon-tray {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--radius-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--bg-tertiary);
|
||||
color: var(--text-secondary);
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn-icon-tray:hover {
|
||||
background: var(--border-highlight);
|
||||
color: var(--text-primary);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-icon-tray:active {
|
||||
transform: translateY(1px) scale(0.94);
|
||||
}
|
||||
|
||||
.btn-submit-tray {
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--accent-submit-gradient);
|
||||
color: #ffffff;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.02em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
box-shadow: 0 2px 8px var(--accent-submit-glow);
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.btn-submit-tray:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px var(--accent-submit-glow);
|
||||
}
|
||||
|
||||
.btn-submit-tray:active {
|
||||
transform: translateY(1px) scale(0.96);
|
||||
}
|
||||
|
||||
.btn-submit-tray:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
THE 4x5 BOARD GRID (20 TILES)
|
||||
========================================================================== */
|
||||
|
||||
.board-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tiles-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.tiles-grid {
|
||||
grid-gap: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Single Board Tile */
|
||||
.board-tile {
|
||||
aspect-ratio: 1.35 / 1;
|
||||
max-height: 56px;
|
||||
min-height: 44px;
|
||||
background: var(--tile-bg);
|
||||
border: 1.5px solid var(--tile-border);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--tile-shadow);
|
||||
color: var(--tile-text);
|
||||
font-size: 1.12rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.03em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.board-tile {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.board-tile:hover:not(.selected) {
|
||||
background: var(--tile-bg-hover);
|
||||
border-color: var(--border-highlight);
|
||||
box-shadow: var(--tile-shadow-hover);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.board-tile:active:not(.selected) {
|
||||
background: var(--tile-bg-active);
|
||||
transform: translateY(1px) scale(0.96);
|
||||
box-shadow: var(--tile-shadow-selected);
|
||||
}
|
||||
|
||||
/* Selected state: tile is currently in construction tray */
|
||||
.board-tile.selected {
|
||||
opacity: 0.38;
|
||||
background: var(--bg-tertiary);
|
||||
border-color: var(--border-subtle);
|
||||
transform: scale(0.95);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.board-tile.selected::after {
|
||||
content: '✓';
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 6px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 900;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Locked solved Quartile tile state */
|
||||
.board-tile.locked {
|
||||
background: linear-gradient(145deg, var(--tile-bg), var(--bg-tertiary));
|
||||
border-color: var(--accent-quartile);
|
||||
}
|
||||
|
||||
.board-tile.locked::before {
|
||||
content: '🔒';
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 6px;
|
||||
font-size: 0.65rem;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Board tile shuffle animation */
|
||||
.board-tile.flipping {
|
||||
animation: tileFlip 0.4s var(--ease-smooth);
|
||||
}
|
||||
|
||||
@keyframes tileFlip {
|
||||
0% { transform: scale(1) rotateY(0); }
|
||||
50% { transform: scale(0.85) rotateY(90deg); opacity: 0.5; }
|
||||
100% { transform: scale(1) rotateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* Solved Quartile Section Header */
|
||||
.locked-section-divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 4px 6px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--accent-quartile);
|
||||
}
|
||||
Reference in New Issue
Block a user