/* Chess Coach – Custom styles (layered on Pico CSS) */

/* Chessground board sizing */
.cg-board-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cg-board-wrap cg-board {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

/* Navigation brand */
nav strong {
  font-size: 1.2rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

/* Tab bar */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.tab-btn:first-child { border-radius: 4px 0 0 4px; }
.tab-btn:last-child { border-radius: 0 4px 4px 0; }
.tab-btn:not(:first-child) { border-left: none; }

.tab-btn.active {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border-color: var(--pico-primary);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--pico-muted-border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--pico-primary);
  background: var(--pico-primary-focus);
}

/* Flash messages */
[role="alert"] {
  padding: 0.7rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-success { background: var(--pico-ins-color); color: white; }
.flash-error { background: var(--pico-del-color); color: white; }
.flash-warning { background: #e67e22; color: white; }
.flash-info { background: var(--pico-primary); color: white; }

/* Score badge */
.score-badge {
  background: var(--pico-primary);
  color: white;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Blunder row hover */
.blunder-row:hover {
  background: var(--pico-primary-focus);
}

/* Puzzle card */
.puzzle-card {
  text-align: center;
}

/* Score ring on report page */
.score-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  margin: 1rem auto;
  border-radius: 50%;
  border: 8px solid var(--pico-primary);
  background: var(--pico-card-background-color);
}

.score-ring .score-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--pico-primary);
  line-height: 1;
}

.score-ring .score-grade {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pico-color);
  margin-top: 0.2rem;
}

/* Practice board responsive */
@media (max-width: 768px) {
  .grid[style*="grid-template-columns: minmax"] {
    grid-template-columns: 1fr !important;
  }
  .grid[style*="grid-template-columns: 280px"] {
    grid-template-columns: 1fr !important;
  }
}
