/* FEH Game Gallery — OSU-themed.
   Scarlet navbar, light page, white cards. Mirrors the look of internal OSU
   ECE web apps (Bootstrap-based, bg-osu navbar). */

* { box-sizing: border-box; }
:root {
  /* Ohio State brand */
  --osu-scarlet:       #BB0000;
  --osu-scarlet-dark:  #990000;
  --osu-gray:          #666666;

  /* Surfaces */
  --bg-page:    #f5f5f5;
  --bg-card:    #ffffff;
  --line:       #dddddd;
  --line-soft:  #eeeeee;

  /* Text */
  --text-0:     #1f1f1f;
  --text-1:     #555555;
  --text-2:     #888888;

  --radius:     4px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-0);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--osu-scarlet); text-decoration: none; }
a:hover { color: var(--osu-scarlet-dark); text-decoration: underline; }

/* ---------- Navbar ----------------------------------------------------- */

.navbar {
  background: var(--osu-scarlet);
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.navbar-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.navbar-brand:hover { color: #fff; text-decoration: none; }
.navbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.3);
}
.navbar-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
}
.navbar-nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
}
.navbar-nav a {
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
}
.navbar-nav a:hover { color: #fff; text-decoration: none; }

/* ---------- Main content --------------------------------------------- */

main { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

/* ---------- Toolbar (search + filter) -------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.toolbar-search,
.toolbar-select {
  background: #fff;
  color: var(--text-0);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
}
.toolbar-search { flex: 1; min-width: 0; }
.toolbar-search::placeholder { color: var(--text-2); }
.toolbar-search:focus,
.toolbar-select:focus {
  border-color: #888;
  box-shadow: 0 0 0 2px rgba(187,0,0,0.12);
}
.toolbar-select { cursor: pointer; }
.toolbar-count {
  color: var(--text-2);
  font-size: 0.85rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  text-align: center;
  color: var(--text-2);
  font-size: 0.92rem;
  padding: 3rem 1rem;
}

/* ---------- Grid ----------------------------------------------------- */

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

.card {
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.card-playable { cursor: pointer; }
.card-playable:hover {
  border-color: #bbb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.card-locked { opacity: 0.6; }

.card-thumb {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #ececec;
  border-bottom: 1px solid var(--line-soft);
}

.card-body { padding: 0.85rem 1rem 1rem; }
.card-title-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
}
.card-title-row h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-0);
}
.card-semester {
  font-size: 0.72rem;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.card-tagline {
  margin: 0.35rem 0 0.6rem;
  color: var(--text-1);
  font-size: 0.88rem;
  line-height: 1.4;
  min-height: 2.4em;
}
.card-authors {
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 0.6rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: #f0f0f0;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--text-1);
}

/* ---------- Player page ---------------------------------------------- */

.player-body { display: flex; flex-direction: column; min-height: 100vh; }

.player-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}
@media (max-width: 900px) {
  .player-layout { grid-template-columns: 1fr; }
}

.player-stage { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.player-frame {
  width: 100%;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.player-frame iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
  background: #000;
}
.player-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-2);
}

.player-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  align-self: start;
  position: sticky;
  top: 5rem;
}
.player-sidebar h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 600;
}
.player-tagline {
  margin: 0 0 1rem;
  color: var(--text-1);
  line-height: 1.45;
  font-size: 0.92rem;
}

.side-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.9rem;
}
.meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
  margin-bottom: 0.15rem;
  font-weight: 500;
}
.meta-value {
  font-size: 0.88rem;
  color: var(--text-0);
}

.side-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }

.side-section { margin-top: 1.1rem; }
.side-section h3 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  font-weight: 600;
}
.side-section p {
  margin: 0;
  color: var(--text-1);
  line-height: 1.55;
  font-size: 0.92rem;
}
.side-section ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-1);
  font-size: 0.9rem;
  line-height: 1.55;
}

.side-links { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 1.25rem; }

.btn {
  display: inline-block;
  text-align: center;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.35;
}
.btn-primary {
  background: var(--osu-scarlet);
  color: #fff;
  border-color: var(--osu-scarlet);
}
.btn-primary:hover {
  background: var(--osu-scarlet-dark);
  color: #fff;
  text-decoration: none;
}
.btn-secondary {
  background: #fff;
  color: var(--text-0);
  border-color: #ccc;
}
.btn-secondary:hover {
  background: #f0f0f0;
  text-decoration: none;
}
