/* ===== SPELLS HUB ===== */

.spell-hub-all {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #1a1a2e;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.spell-hub-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 202, 131, 0.3);
}

.spell-hub-section {
  max-width: 900px;
  margin: 0 auto 2rem;
}

.spell-hub-section h2 {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--card-border);
}

.spell-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}

.spell-hub-btn {
  display: block;
  padding: 0.7rem 1rem;
  border: 2px solid var(--card-border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}

.spell-hub-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .spell-hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.4rem;
  }

  .spell-hub-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ===== LEVEL NAV BAR ===== */

.level-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
  justify-content: center;
}

.level-nav-btn {
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  text-align: center;
}

.level-nav-btn:hover,
.level-nav-btn.active {
  background: var(--accent);
  color: #1a1a2e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 202, 131, 0.3);
}

@media (max-width: 768px) {
  .level-nav {
    gap: 0.35rem;
  }

  .level-nav-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
  }
}

/* ===== SPELL TABLE (level pages) ===== */

.spells-table-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
}

.spells-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.spells-table th {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 2px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.spells-table td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}

.spells-table tr:last-child td {
  border-bottom: none;
}

.spells-table tbody tr {
  transition: background 0.1s;
}

.spells-table tbody tr:hover {
  background: var(--card-bg);
}

.spells-table .spell-name {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.spells-table .spell-school {
  white-space: nowrap;
}

.spells-table .spell-components {
  white-space: nowrap;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .spells-table {
    font-size: 0.8rem;
  }

  .spells-table th,
  .spells-table td {
    padding: 0.35rem 0.4rem;
  }

  .spells-table .hide-mobile {
    display: none;
  }
}
