@tailwind base; @tailwind components; @tailwind utilities; body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* Chess board - INCREASED SIZE */ .chess-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: 100%; max-width: 800px !important; /* Force increased size */ aspect-ratio: 1 / 1; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); position: relative; /* For loading overlay */ } /* Chess squares */ .chess-square { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.2s; } .chess-square:hover { filter: brightness(1.1); } /* Chess pieces - INCREASED SIZE */ .chess-piece { width: 85% !important; /* Increased from 80% */ height: 85% !important; /* Increased from 80% */ background-size: contain; background-repeat: no-repeat; background-position: center; transition: transform 0.2s; } .chess-piece:hover { transform: scale(1.1); } /* Move indicators */ .move-dot { position: absolute; width: 25%; height: 25%; border-radius: 50%; background-color: rgba(0, 128, 0, 0.6); opacity: 0.8; } .square-highlight { position: absolute; width: 100%; height: 100%; background-color: rgba(20, 85, 30, 0.5); opacity: 0.7; } .square-selected { position: absolute; width: 100%; height: 100%; background-color: rgba(255, 255, 0, 0.4); opacity: 0.7; } /* Hint indicators */ .hint-square { position: absolute; width: 100%; height: 100%; background-color: rgba(0, 128, 255, 0.5); opacity: 0.7; animation: pulseHint 1.5s infinite ease-in-out; z-index: 1; } /* Board labels - IMPROVED POSITIONING */ /* Option 1: Labels outside the board */ .chess-board-container { position: relative; width: 880px; max-width: 100%; margin: 0 auto; } .chess-board { margin: 30px; } .rank-labels { position: absolute; top: 30px; left: 0; display: flex; flex-direction: column; height: calc(100% - 60px); } .file-labels { position: absolute; bottom: 0; left: 30px; display: flex; width: calc(100% - 60px); } .rank-label, .file-label { display: flex; justify-content: center; align-items: center; font-size: 1rem; font-weight: bold; color: #f3f4f6; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); } .rank-label { height: 12.5%; } .file-label { width: 12.5%; } /* Option 2: Labels inside the board (improved) */ .square-rank-label, .square-file-label { position: absolute; font-size: 0.9rem; font-weight: bold; pointer-events: none; z-index: 2; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); color: rgba(255, 255, 255, 0.9); } .square-rank-label { left: 5px; top: 5px; } .square-file-label { right: 5px; bottom: 5px; } .light-square .square-rank-label, .light-square .square-file-label { color: rgba(0, 0, 0, 0.7); text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9); } .dark-square .rank-label, .dark-square .file-label { color: rgba(255, 255, 255, 0.9); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); } /* Animations */ @keyframes movePiece { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } } @keyframes highlightSquare { 0% { box-shadow: inset 0 0 0 3px rgba(255, 255, 0, 0); } 50% { box-shadow: inset 0 0 0 3px rgba(255, 255, 0, 0.7); } 100% { box-shadow: inset 0 0 0 3px rgba(255, 255, 0, 0.4); } } @keyframes pulseHint { 0% { background-color: rgba(0, 128, 0, 0.4); } 50% { background-color: rgba(0, 128, 0, 0.7); } 100% { background-color: rgba(0, 128, 0, 0.4); } } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } /* Animation classes */ .moving-piece { animation: movePiece 0.5s ease-in-out; } .highlight-square { animation: highlightSquare 1s ease-in-out; animation-iteration-count: 2; } .fade-in { animation: fadeIn 0.3s ease-in-out; } .last-move { box-shadow: inset 0 0 0 3px rgba(255, 215, 0, 0.5); } /* Game controls */ .game-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; } .control-button { padding: 0.5rem 1rem; border-radius: 0.25rem; font-weight: 500; transition: all 0.2s; } .control-button:hover { transform: translateY(-2px); } /* Game info panel */ .game-info { padding: 1rem; border-radius: 0.5rem; background-color: white; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); } /* Status message */ .status-message { font-size: 1.2rem; font-weight: bold; padding: 0.5rem; margin-bottom: 1rem; text-align: center; } /* Loading spinner */ .spinner { border: 4px solid rgba(0, 0, 0, 0.1); width: 36px; height: 36px; border-radius: 50%; border-left-color: #09f; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Responsive design */ @media (max-width: 768px) { .chess-board { max-width: 100% !important; } .game-layout { flex-direction: column; } }