/* ============================================================
   GAME HUB — home.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  font-family: 'Arial Black', 'Impact', sans-serif;
  background: #111;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

html { overflow: hidden; }
body { overflow-y: auto; }

.hidden { display: none !important; }

/* === SCREENS =========================================== */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
}

/* === PLAYER SELECT ===================================== */
#player-select-screen {
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #06060e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-select-content {
  text-align: center;
  padding: 40px 20px;
  width: 100%;
  max-width: 500px;
}

.player-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 28px;
}

.player-card {
  background: #1a1a2e;
  border: 3px solid #444;
  border-radius: 12px;
  padding: 20px 28px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  min-width: 120px;
}

.player-card:hover {
  border-color: #ffcc00;
  transform: scale(1.04);
}

.player-card-icon { font-size: 2.5rem; }
.player-card-name { font-size: 1.1rem; margin-top: 8px; letter-spacing: 0.04em; }

/* === HUB SCREEN ======================================= */
#hub-screen {
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #06060e 100%);
}

.hub-scroll {
  width: 100%;
  min-height: 100%;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.hub-content {
  width: 100%;
  max-width: 560px;
  padding: 32px 20px 48px;
}

.hub-title {
  text-align: center;
  font-size: 2rem;
  color: #ffcc00;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 6px;
}

.hub-tagline {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  font-family: Arial, sans-serif;
  font-weight: normal;
  margin-bottom: 28px;
}

/* === PROFILE CARD ====================================== */
.profile-card {
  background: #1a1a2e;
  border: 3px solid #ffcc00;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.profile-card-name {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: #ffcc00;
}

/* Subject tabs */
.subject-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.subject-tab {
  flex: 1;
  padding: 8px;
  background: #0e0e1e;
  border: 2px solid #333;
  border-radius: 8px;
  color: #888;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Arial Black', sans-serif;
  transition: border-color 0.15s, color 0.15s;
}

.subject-tab.active {
  border-color: #ffcc00;
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.08);
}

/* Stats panel */
.profile-stats { font-family: Arial, sans-serif; }

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 52px;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
}

.stat-recent {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.progress-hint {
  font-size: 0.72rem;
  color: #666;
}

/* Skills section */
.skills-details {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
}

.skills-summary {
  font-size: 0.8rem;
  color: #aaa;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}

.skills-summary::-webkit-details-marker { display: none; }
.skills-summary::before { content: '▶  '; font-size: 0.65rem; }
details[open] .skills-summary::before { content: '▼  '; }

.skills-content { margin-top: 12px; }

/* (reuse dinohunt's skills classes) */
.skills-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.skills-grade-name { font-size: 0.85rem; color: #ccc; font-weight: bold; font-family: Arial, sans-serif; }
.skills-count { font-size: 0.8rem; color: #aaa; font-family: Arial, sans-serif; }
.skills-count-done { color: #7fff00; font-weight: bold; }

.skills-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: #7fff0033;
  color: #7fff00;
  font-weight: bold;
  font-family: Arial, sans-serif;
}

.skills-badge-locked {
  background: #ff443333;
  color: #ff8866;
}

.skills-category { margin-bottom: 10px; }
.skills-category-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  margin-bottom: 4px;
  font-family: Arial, sans-serif;
}

.skill-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  padding: 3px 0;
  font-size: 0.8rem;
  color: #bbb;
  line-height: 1.3;
  font-family: Arial, sans-serif;
}

.skill-row-done { color: #7fff00; }
.skill-text { flex: 1; }
.skill-badge-mastered { font-size: 0.7rem; color: #7fff00; font-weight: bold; white-space: nowrap; }
.skill-badge-progress { font-size: 0.7rem; color: #ffaa33; white-space: nowrap; }
.skill-badge-none     { font-size: 0.7rem; color: #555;    white-space: nowrap; font-style: italic; }

.skills-empty { color: #555; font-size: 0.8rem; font-family: Arial, sans-serif; }

.profile-loading {
  text-align: center;
  color: #555;
  font-size: 0.85rem;
  font-family: Arial, sans-serif;
  padding: 8px 0;
}

/* === GAME CARDS ======================================== */
.pick-label {
  font-size: 1rem;
  color: #aaa;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  text-align: center;
}

.game-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #1a1a2e;
  border: 3px solid #333;
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.game-card:hover {
  border-color: #ffcc00;
  background: #22223a;
}

.game-entry {
  display: flex;
  flex-direction: column;
}

.game-info { flex: 1; }

.game-icon { font-size: 2.2rem; flex-shrink: 0; }

.game-name {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #ffcc00;
  margin-bottom: 4px;
}

.game-desc {
  font-size: 0.8rem;
  color: #888;
  font-family: Arial, sans-serif;
  font-weight: normal;
  line-height: 1.3;
}

.hub-footer {
  text-align: right;
  margin-top: 20px;
  padding-bottom: 8px;
}

.tool-link {
  font-size: 0.72rem;
  font-family: Arial, sans-serif;
  color: #444;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.tool-link:hover { color: #ffcc00; }
