/* ===================================
   VISUALIZATION MODE STYLES
   =================================== */

/* CSS Variables & Theme (matching pgnViewer.css) */
:root {
    --blue: rgb(19, 41, 75);
    --gold: #d9c89d; 
    --grey: rgb(199,201,199);
    --purple: #800080;
}

/* Base Styles */
body {
  font-family: sans-serif;
  padding: 10px;
  background-color: rgb(197, 206, 233);
}

h1 {
    background-color: rgb(19, 41, 75);
    text-align: center;
    color: rgb(217, 201, 157);
    padding: 10px 20px;
    border-radius: 20px;
    display: block;
    margin: 30px 70px;
}

h3 {
  color: var(--blue);
  margin-bottom: 10px;
}

/* PGN Selector Buttons */
.pgn-selector {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pgn-selector button {
  padding: 8px 16px;
  background-color: var(--blue);
  color: var(--gold);
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.pgn-selector button:hover {
  opacity: 0.8;
}

/* Status Message */
#statusMessage {
  margin: 10px 20px;
  padding: 10px 15px;
  background-color: var(--blue);
  color: var(--gold);
  border-left: 4px solid #c00;
  font-weight: bold;
  border-radius: 6px;
  display: none;
}

/* Layout Container */
#layoutContainer {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Left Column - Board */
#leftColumn {
  flex-shrink: 0;
}

#board {
  width: 500px;
  margin-bottom: 20px;
}

/* Controls */
#controls {
  background-color: var(--blue);
  color: var(--gold);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 500px;
}

#controls label {
  font-weight: bold;
  margin-bottom: 5px;
}

#controls select {
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: white;
  font-size: 14px;
}

#controls button {
  padding: 10px 15px;
  margin: 5px 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  background-color: var(--gold);
  color: var(--blue);
}

#controls button:hover {
  opacity: 0.85;
}

#controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Right Column - Move Preview */
#rightColumn {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 300px;
}

#gameHeader {
  background-color: var(--blue);
  color: var(--gold);
  padding: 20px;
  border-radius: 12px;
}

#gameHeader h3 {
  color: var(--gold);
  margin-top: 0;
  margin-bottom: 10px;
}

#gameInfo {
  font-size: 0.95em;
  line-height: 1.6;
}

#gameInfo div {
  margin: 4px 0;
}

.headerLabel {
  font-weight: bold;
  margin-right: 6px;
}

#movePreviewPanel {
  background-color: var(--blue);
  color: var(--gold);
  padding: 20px;
  border-radius: 12px;
  min-height: 200px;
}

#movePreviewPanel h3 {
  color: var(--gold);
  margin-top: 0;
}

#movePreview {
  font-family: 'ChessMerida', monospace;
  font-size: 1.3em;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Game Selector Container */
#gameSelectorContainer {
  background-color: var(--blue);
  color: var(--gold);
  padding: 15px;
  border-radius: 12px;
}

/* Custom Game Selector (reusing from pgnViewer.css) */
.custom-select {
  padding: 8px 0px; 
  margin: 0px 10px;
  position: relative;
  font-family: sans-serif;
  display: inline-block;
  width: max-content;
  min-width: 300px;
  max-width: 500px;
}

.select-option {
  padding: 12px 32px;
  background-color: rgb(25, 47, 81);
  border-radius: 12px;
  color: var(--gold);
  cursor: pointer;
  position: relative;
}

.select-option:after {
  position: absolute;
  content: "";
  top: 25px;
  right: 10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: var(--gold) transparent transparent transparent;
}

.select-option.arrow-up:after {
  border-color: transparent transparent var(--gold) transparent;
  top: 20px;
}

.options-container {
  position: absolute;
  background-color: rgb(0, 21, 52);
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  border-radius: 16px;
  max-height: 40vh;
  overflow: auto;
  display: none;
}

.options-container.open { 
  display: block;
}

.options-container div {
  color: var(--gold);
  padding: 8px 16px;
  border: 1px solid transparent;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  cursor: pointer;
}

.options-container div:hover {
  background-color: rgb(94, 110, 150);
}

.option.mark {
  background-color: rgb(94, 110, 150);
}

/* Full Game Notation */
#fullGameNotation {
  background-color: var(--blue);
  color: var(--gold);
  padding: 20px 30px;
  border-radius: 15px;
  margin: 20px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

#fullGameNotation h3 {
  color: var(--gold);
  margin-top: 0;
}

#gameText {
  font-family: 'ChessMerida', monospace;
  font-size: 1.2em;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
  #layoutContainer {
    flex-direction: column;
  }
  
  #rightColumn {
    width: 100%;
  }
}


/* ===================================
   DEBUG PANEL - KEPT (Working fine in RW)
   =================================== */
#debugPanel {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: 'Playfair Display';
  font-size: 0.8em;
  background: var(--blue);
  border: 1px solid #ccc;
  padding: 6px 10px;
  margin: 8px 12px;
  border-radius: 8px;
  color: var(--gold);
  max-width: 90%;
}

#debugPanel.visible {
  display: flex;
}
