Spaces:
Running
Running
File size: 2,713 Bytes
8085056 0e3fcb8 8085056 0e3fcb8 8085056 0e3fcb8 8085056 0e3fcb8 8085056 0e3fcb8 8085056 0e3fcb8 8085056 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');
:root {
--square-light: #EBECD0;
--square-dark: #779556;
--highlight-move: rgba(255, 255, 0, 0.5);
--highlight-check: rgba(255, 0, 0, 0.6);
--highlight-selected: rgba(20, 85, 30, 0.5);
--dot-color: rgba(0,0,0,0.15);
}
body {
font-family: 'Inter', sans-serif;
background-color: #0f172a;
}
/* Chess Board Grid */
#board {
display: grid;
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(8, 1fr);
user-select: none;
}
.square {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
cursor: pointer;
}
.square.light {
background-color: var(--square-light);
color: var(--square-dark); /* for coordinate labels if added */
}
.square.dark {
background-color: var(--square-dark);
color: var(--square-light);
}
/* Piece Styling (Unicode) */
.piece {
font-size: clamp(24px, 8vw, 56px);
line-height: 1;
cursor: grab;
z-index: 10;
transition: transform 0.1s;
filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.3));
}
.piece.white {
color: #f8f9fa;
text-shadow: 0 0 2px #000;
}
.piece.black {
color: #212529;
text-shadow: 0 0 1px #fff;
}
.piece:active {
cursor: grabbing;
transform: scale(1.1);
}
/* Highlights */
.square.selected {
background-color: #baca44 !important; /* Classic selection color */
}
.square.last-move {
background-color: #f5f682 !important;
}
.square.check {
background: radial-gradient(circle, var(--highlight-check) 0%, transparent 70%);
}
.square.valid-move::after {
content: '';
width: 30%;
height: 30%;
background-color: var(--dot-color);
border-radius: 50%;
position: absolute;
}
.square.valid-capture::after {
content: '';
position: absolute;
width: 80%;
height: 80%;
border: 4px solid rgba(0,0,0,0.15);
border-radius: 50%;
box-sizing: border-box;
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-down {
animation: fadeIn 0.8s ease-out forwards;
}
/* Custom Scrollbar */
#move-history::-webkit-scrollbar {
width: 6px;
}
#move-history::-webkit-scrollbar-track {
background: #1e293b;
}
#move-history::-webkit-scrollbar-thumb {
background: #475569;
border-radius: 3px;
}
/* Utility */
.shadow-glow {
box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.diff-btn.active {
background-color: #10b981; /* Tailwind Emerald 500 */
color: white;
} |