/* PGN Viewer Styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.pgn-viewer-main {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
width: 100%;
padding: 20px;
}
.container {
background: white;
padding: 30px;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
max-width: 900px;
width: 100%;
}
h2 {
text-align: center;
color: #333;
margin: 0 0 20px 0;
font-size: 1.8rem;
}
/* PGN Input Section */
.pgn-input-section {
margin-bottom: 20px;
}
.pgn-input-section label {
display: block;
font-weight: 600;
color: #333;
margin-bottom: 8px;
font-size: 14px;
}
.pgn-input {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 5px;
font-family: 'Courier New', monospace;
font-size: 13px;
color: #333;
resize: vertical;
min-height: 150px;
}
.pgn-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* Controls */
.controls {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 15px;
}
.control-group {
display: flex;
flex-direction: column;
}
.control-group label {
font-weight: 600;
color: #333;
margin-bottom: 5px;
font-size: 14px;
}
.control-select {
padding: 8px 12px;
border: 2px solid #ddd;
border-radius: 5px;
font-size: 14px;
cursor: pointer;
background: white;
color: #333;
transition: border-color 0.2s;
}
.control-select:focus {
outline: none;
border-color: #667eea;
}
.control-select:hover {
border-color: #999;
}
/* Toggle Controls */
.toggle-controls {
display: flex;
gap: 20px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.toggle-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
font-size: 14px;
color: #333;
}
.toggle-label input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
/* Viewer Wrapper */
.viewer-wrapper {
display: flex;
justify-content: center;
margin-top: 20px;
padding: 20px;
background: #f5f5f5;
border-radius: 8px;
}
.pgn-viewer-container {
width: 100%;
display: flex;
justify-content: center;
}
/* Override pgn-viewer default styles if needed */
.pgn-viewer-container > div {
max-width: 100%;
}
/* Loading States */
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
gap: 20px;
color: white;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Error States */
.error-container {
background: white;
border: 2px solid #ff4a4a;
border-radius: 15px;
padding: 30px;
margin: 40px auto;
max-width: 600px;
text-align: center;
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.error-container strong {
color: #ff4a4a;
font-size: 1.5rem;
display: block;
margin-bottom: 15px;
}
.error-details {
color: #666;
margin-top: 15px;
font-size: 0.95rem;
}
/* Responsive Design */
@media (max-width: 768px) {
.pgn-viewer-main {
padding: 10px;
}
.container {
padding: 20px;
}
h2 {
font-size: 1.5rem;
}
.controls {
grid-template-columns: 1fr;
}
.toggle-controls {
flex-direction: column;
gap: 10px;
}
.viewer-wrapper {
padding: 10px;
}
}
@media (max-width: 480px) {
.container {
padding: 15px;
}
h2 {
font-size: 1.3rem;
}
.pgn-input {
font-size: 12px;
}
}
/* Ensure pgn-viewer styles are properly scoped */
.pgn-viewer-container .buttons,
.pgn-viewer-container .movesTable,
.pgn-viewer-container .chessboard {
max-width: 100%;
}