
/* Index */
.see-more-button {
  background: var(--accent-color);
  color: var(--primary-bg);
  padding: 10px 20px;
  font-size: 16px;
  margin-top: 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.see-more-button:hover {
  background: var(--border-color);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.card-container img {
  width: 200px;
  height: auto;
  border: 2px solid var(--accent-color);
  border-radius: 5px;
}

/* shipbuilder.css */
:root {
  --primary-bg: #0b0c10;
  --secondary-bg: #1f2833;
  --accent-color: #66fcf1;
  --text-color: #c5c6c7;
  --border-color: #45a29e;
  --highlight-color: #ffcc00;
  --cell-bg: #1a1a1a;
}

/* General Styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Exo 2', sans-serif;
  background: radial-gradient(ellipse at bottom, var(--secondary-bg) 0%, var(--primary-bg) 100%);
  color: var(--text-color);
}

header {
  text-align: center;
  padding: 20px;
}

h1 {
  font-size: 2.5em;
  color: var(--accent-color);
  text-shadow: 0 0 8px var(--accent-color);
  margin-bottom: 10px;
}

h2 {
  font-size: 1.75em;
  font-weight: 700;
  color: var(--accent-color);
  margin-top: 40px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border-color);
}

h3 {
  font-size: 1.5em;
}

p {
  font-size: 1.1em;
  margin: 15px 0;
  text-align: justified;
}
	
.builder-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

    
.footer {
      background: var(--secondary-bg);
      padding: 20px;
      margin-top: 20px;
}
    
.nav-links {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 20px;
}
    
.nav-links a {
      color: var(--accent-color);
      text-decoration: none;
      font-size: 18px;
      transition: color 0.3s ease, background-color 0.3s ease;
      border: 2px solid var(--highlight-color);
      padding: 8px 12px;
      border-radius: 4px;
      background-color: rgba(255, 204, 0, 0.2);
}
    
.nav-links a:hover {
      background-color: var(--highlight-color);
      color: var(--primary-bg);
}

/* Update for the shipbuilder page */

/* Shipbuilder Page Styles */
/* Builder Container */
.builder-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

/* Grid Section: Wrap grid and zoom slider together */
.grid-section {
  flex: 1;
}

/* Zoom Slider */
.zoom-slider-container {
  text-align: center;
  margin-bottom: 10px;
}

/* Grid Styles - 14x8 grid, cell ratio 2.5 x 3.5 (height = 140% of width) */
.grid-container {
  position: relative;
  z-index: 1; /* Grid is behind the modules sidebar */
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  border: 2px solid var(--border-color);
  padding: 5px;
  background: var(--cell-bg);
  border-radius: 10px;
  transform: scale(1);
  transform-origin: top left;
}

.grid-cell {
  background: var(--primary-bg);
  border: 1px dashed var(--border-color);
  border-radius: 5px;
  width: 100%;
  padding-top: 140%; /* 140% gives a 2.5:3.5 ratio */
  position: relative;
}

.grid-cell .cell-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* Allow modules to expand beyond the cell */
}

.grid-cell .cell-content img,
.dropped-module {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* Align image to the top */
  transition: transform 0.3s ease; /* Smooth scaling animation */
}

.dropped-module:hover {
  transform: scale(1.05);
  border: 2px solid var(--highlight-color);
  box-shadow: 0 0 8px var(--highlight-color);
}

/* Modules Sidebar */
.modules-container {
  width: 375px;
  position: relative;
  z-index: 2;  /* Modules sidebar sits on top of the grid */
  background: var(--primary-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  overflow-y: auto;
  max-height: 80vh;
}

.modules-container h2 {
	margin-top: 0; 
  text-align: center;
  font-size: 1.8em;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-shadow: 0 0 8px var(--accent-color);
}

/* Modules List: Two columns */
.modules-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

/* Module Cards in Sidebar: Smaller */
.module-card {
  display: block;
  margin: 5px auto;
  width: 80px;
  cursor: grab;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: transform 0.2s, border-color 0.2s;
}

.module-card:hover {
  transform: scale(1.05);
  border-color: var(--highlight-color);
}

.module-card:active {
  cursor: grabbing;
}

/* Dropped modules in grid cells fill the cell */
.grid-cell .cell-content img,
.dropped-module {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropped-module.expanded {
  transform: scale(2.5);
  z-index: 10;
  position: relative;
}

/* Responsive */
@media (max-width: 600px) {
  .builder-container {
    flex-direction: column;
  }
  .modules-container {
    width: 100%;
    max-height: none;
  }
	.container {
	padding: 15px;
	}
	h1 { font-size: 2em; }
	h2 { font-size: 1.75em; }
	summary { font-size: 1.25em; }
}

/* Deckbuilder */
    /* Main Content & Layout */
    .main-content {
      flex: 1;
      padding: 20px;
      margin-right: 320px;
    }
    .button-container {
      margin-bottom: 20px;
    }
    .filter-btn {
      padding: 10px 15px;
      margin: 5px;
      border: 2px solid var(--highlight-color);
      background-color: rgba(255, 204, 0, 0.2);
      color: var(--accent-color);
      cursor: pointer;
      border-radius: 5px;
      transition: background-color 0.3s ease, color 0.3s ease;
    }
    .filter-btn:hover {
      background-color: var(--highlight-color);
      color: var(--primary-bg);
    }
    .active-filter {
      background-color: var(--highlight-color);
      color: var(--primary-bg);
    }

    /* Card Gallery */
    .card-container {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
    .card-wrapper {
      position: relative;
      display: inline-block;
    }
    .card {
      width: 200px;
      height: auto;
      border-radius: 8px;
      box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
      cursor: pointer;
      transition: border 0.2s ease-in-out;
    }
    .in-deck {
      border: 4px solid var(--highlight-color);
    }
    .card-counter {
      position: absolute;
      bottom: 5px;
      right: 10px;
      background: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 5px 8px;
      border-radius: 5px;
      font-size: 14px;
      display: none;
    }

    /* Game Map */
    #game-map img {
      width: 100%;
      max-width: 1200px;
      border-radius: 8px;
      box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    }

    /* Deck Section */
.deck-section {
  width: 300px;
  padding: 20px;
  background: var(--secondary-bg);
  border-left: 2px solid var(--highlight-color);
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  overflow-y: auto;
  color: var(--text-color);
}
.deck-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}
.deck-title {
  outline: none;
  width: auto;
  border: none;
  background: none;
  text-align: center;
  font-size: 18px;
  color: var(--text-color);
  cursor: text;
}
.pencil-icon {
  cursor: pointer;
  margin-left: 5px;
}
.deck-count {
  font-size: 16px;
  margin-bottom: 10px;
}
.deck-item {
  cursor: pointer;
  padding: 5px;
  border-bottom: 1px solid var(--border-color);
}
.download-btn, .clear-btn {
  display: block;
  margin-top: 10px;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s ease;
}
.download-btn {
  background-color: var(--accent-color);
  color: var(--primary-bg);
}
.download-btn:hover {
  background-color: var(--border-color);
}
.clear-btn {
  background-color: #dc3545;
  color: white;
}
.clear-btn:hover {
  background-color: #c82333;
}
.deck-btn {
  background-color: var(--accent-color);
  color: var(--primary-bg);
  border: none;
  padding: 8px 15px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
  height: 40px;
  margin-left: 10px;
}
.deck-btn:hover {
  background-color: var(--border-color);
}

/* Overview and Full Rules */
.image-row {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.image-row img {
  max-width: 30%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.image-row img:hover {
  transform: scale(1.05);
}

/* Full Rules */
    /* Collapsible sections using details/summary */
details {
  margin-bottom: 1em;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform 0.2s ease-in-out;
}
details:hover {
  transform: scale(1.01);
}
summary {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 8px var(--accent-color);
  cursor: pointer;
  outline: none;
  padding: 0.5em 0;
  transition: transform 0.2s ease-in-out;
}
summary:hover {
  transform: scale(1.01);
}
/* Remove default arrow markers */
summary::-webkit-details-marker {
  display: none;
}

#introduction-canvas-container {
  display: block;
  width: 600px;
  height: 400px;
  position: relative; /* if needed */
}
