:root {
  --primary: #0d6efd;
}

.no-style-link {
  color: inherit;        /* Use the same color as surrounding text */
  text-decoration: none; /* Remove underline */
  cursor: pointer;       /* Optional: makes it feel clickable */
  color: white;        /* Set the desired color */
  font-size: xx-large;
}

.no-style-link:hover {
  color: lightblue;        /* Keep the same color on hover */
}

/* ===== Global Layout ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-width: 400px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f9f9f9;
  color: #333;
  text-align: center;
  background: linear-gradient(135deg, #f0f2f5, #e6e9ef);
}

/* Header */
header {
  background-color: black;
  color: white;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  font-weight: bold;
}

pre {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: x-large;
  margin: 0;
}

/* Page layout */
.page-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 80px);
  flex-wrap: nowrap;    /* do not wrap on wider screens */
}

/* Left column */
.left-column {
  width: 150px;
  background: linear-gradient(135deg, var(--primary), blue);
  color: white;
  padding: 1rem;
  flex-shrink: 0;
  overflow-y: auto;
}

/* Main content */
.main-content {
  min-width: 400px;
  flex: 1;
  padding: 1rem;
  background: #f9f9f9;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  overflow-x: auto;   /* horizontal scroll for board if needed */
  overflow-y: auto;   /* vertical scroll */
}
/* Responsive */
@media (max-width: 480px) {
  .left-column {
    width: 100px;
    padding: 0.5rem;
  }
  .main-content {
    padding: 0.5rem;
  }
}

/* ===== Gambit Game Styles ===== */

h1 {
  margin-bottom: 20px;
  font-size: 2rem;
  color: #222;
}

h3 {
  margin: 10px 0;
  font-weight: 600;
  color: #444;
}

/* Game Layout */
#gameLayout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-top: 40px;
  max-width: 100%;      /* ensures it never exceeds main-content */
  flex-wrap: wrap;       /* wrap on smaller screens */
  box-sizing: border-box;
}

.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}


.player, #boardWrapper {
  flex-shrink: 0;       /* prevents shrinking and overlap */
}

/* Board Wrapper */
#boardWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100% - 120px); /* reserve space for Player A & B */
  overflow-x: auto;               /* allow scroll if board is wide */
}

/* Board */
#board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto; /* horizontal scroll inside board if needed */
}

.rowWrap {
  display: flex;
  gap: 6px;
}

.slot, .pSlot {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #e0e0e0;
  border: 2px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.slot:hover:not(.locked),
.pSlot:hover {
  background: #d6e4f9;
  border-color: #88c4ff;
}

.tile {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  cursor: grab;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tile:active {
  cursor: grabbing;
  transform: scale(0.9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.locked {
  background: #bbb !important;
  border: none;
}

.highlight {
  outline: 3px solid gold;
  border-radius: 12px;
}

.platform {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.pSlot {
  background: #e0e0e0;
  border: 2px solid #bbb;
}

#controls {
  margin-top: 20px;
}

button {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 10px 18px;
  margin: 6px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.2s;
}

button:hover {
  background: #357ab8;
}

button:active {
  transform: scale(0.96);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

#legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.pill .tile.small {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: none;
}