/* ── App-specific styles for /app (Game Rx) ─────────────────────────────── */
/* Inherits CSS variables from theme.css */

/* ── Nav ── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 0;
}

.app-nav .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-tagline {
  font-size: 0.78rem;
  color: var(--fg-dim);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
}

/* ── Header ── */
.app-header {
  padding: 80px 0 60px;
  text-align: center;
}

.header-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 100px;
  background: rgba(6, 214, 160, 0.1);
  border: 1px solid rgba(6, 214, 160, 0.25);
  color: #06d6a0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.header-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Controls ── */
.controls-section {
  padding: 0 0 48px;
}

.controls-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 14px 44px 14px 44px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder { color: var(--fg-dim); }

.search-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  transition: background 0.2s;
}

.search-clear:hover { background: rgba(255, 255, 255, 0.15); }

/* Filter pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card);
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
}

.pill:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--fg);
}

.pill-active {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.5);
  color: #a78bfa;
}

/* Results meta */
.results-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

.results-tag {
  color: var(--fg-muted);
  margin-left: 6px;
}

/* ── Game Cards Grid ── */
.games-main {
  padding: 0 0 100px;
}

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

/* ── Individual Card ── */
.game-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.25s, transform 0.25s;
}

.game-card:hover {
  border-color: rgba(124, 58, 237, 0.28);
  transform: translateY(-3px);
}

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

.card-category {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.dot-blue   { background: #3b82f6; }
.dot-purple { background: #7c3aed; }
.dot-green  { background: #06d6a0; }
.dot-amber  { background: #f59e0b; }
.dot-rose   { background: #ec4899; }
.dot-cyan   { background: #06b6d4; }

.card-platform {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-style: italic;
  text-align: right;
  max-width: 45%;
  line-height: 1.3;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.25;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
}

.card-benefit {
  margin-bottom: 16px;
}

.benefit-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #06d6a0;
  margin-bottom: 6px;
}

.benefit-text {
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.6;
}

.card-citation {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--fg-dim);
  line-height: 1.5;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
  margin-top: auto;
}

.card-citation svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.6;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 0;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--fg);
}

.empty-state p {
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.1);
  color: #a78bfa;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.6);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-header {
    padding: 60px 0 40px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filter-pills {
    gap: 8px;
  }

  .pill {
    font-size: 0.78rem;
    padding: 7px 14px;
  }
}

@media (max-width: 480px) {
  .card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .card-platform {
    max-width: 100%;
    text-align: left;
  }
}
