/* =============================================================
   Home Page — Live Dashboard
   Imported from style.css via <link>. Kept separate because it's
   large and self-contained.
   ============================================================= */

.home {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== §1 Hero + live status ========== */

.home-hero {
  text-align: center;
  padding: 2.5rem 1rem 1.75rem;
  max-width: 760px;
  margin: 0 auto;
}

.home-hero h1 {
  font-size: 2.25rem;
  color: var(--accent);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.home-hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.home-hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
}

.home-pill--accent {
  color: var(--accent);
  border-color: var(--accent);
}

.home-pill--accent:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.home-pill--live {
  color: var(--text);
}

.home-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dd16a;
  display: inline-block;
  animation: homeLivePulse 2s ease-in-out infinite;
}

@keyframes homeLivePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(61, 209, 106, 0.6); }
  50% { opacity: 0.85; box-shadow: 0 0 0 5px rgba(61, 209, 106, 0); }
}

/* ========== Generic home section ========== */

.home-section {
  margin: 2rem 0;
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding: 0 0.25rem;
}

.home-section-header h2 {
  font-size: 1.1rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.home-section-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.home-section-link:hover {
  color: var(--accent-hover);
}

.home-section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -0.4rem 0.25rem 0.9rem;
}

/* ========== §2 Top comps ========== */

.home-comps {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-comp-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, transform 0.12s;
}

.home-comp-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  color: inherit;
}

.home-comp-rank {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 38px;
  flex-shrink: 0;
  text-align: center;
}

.home-comp-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.home-comp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.home-comp-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-comp-reroll {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  margin-left: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
}

.home-comp-stats {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.home-comp-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.home-comp-stat-value {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.home-comp-stat-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.home-comp-units {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.home-comp-unit {
  position: relative;
  display: inline-block;
}

.home-comp-unit .unit-icon {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 4px;
}

.home-comp-unit-stars {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: gold;
  text-shadow: 0 0 2px #000;
  white-space: nowrap;
  pointer-events: none;
}

.home-comp-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.home-comp-trait {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.home-comp-trait img {
  width: 12px;
  height: 12px;
}

/* ========== §3 Summoner search ========== */

.home-search-section {
  margin: 2rem 0;
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.home-search-inner {
  max-width: 600px;
  margin: 0 auto;
}

.home-search-title {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.home-search-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.home-search-region {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  min-width: 80px;
}

.home-search-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.home-search-input:focus,
.home-search-region:focus {
  outline: none;
  border-color: var(--accent);
}

.home-search-btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
}

.home-search-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
}

/* ========== §4 Trending ========== */

.home-trending {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.home-trending-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.4rem 0.5rem;
}

.home-trending-col-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0.5rem 0.75rem 0.35rem;
}

.home-entity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.12s, border-left-color 0.12s;
}

.home-entity-row:hover {
  background: var(--bg-input);
  border-left-color: var(--accent);
  color: inherit;
}

.home-entity-icon {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
}

.home-entity-body {
  flex: 1;
  min-width: 0;
}

.home-entity-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-entity-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.home-entity-stats {
  display: flex;
  gap: 0.9rem;
  flex-shrink: 0;
}

.home-entity-stat {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.home-entity-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.home-entity-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.home-entity-delta--up {
  color: var(--positive, #5eba7d);
}

.home-entity-delta--down {
  color: var(--negative, #c85c5c);
}

/* ========== §5 Guide cards ========== */

.home-guides {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.home-guide-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, transform 0.12s;
}

.home-guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.home-guide-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
}

.home-guide-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-guide-thumb--text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-input) 0%, var(--border) 100%);
  padding-bottom: 0;
  height: 100px;
}

.home-guide-thumb-glyph {
  font-size: 2rem;
  opacity: 0.5;
}

.home-guide-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s;
}

.home-guide-card:hover .home-guide-play {
  background: var(--accent);
  color: #000;
}

.home-guide-body {
  padding: 0.75rem 0.85rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-guide-title {
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0 0 0.35rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-guide-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-guide-meta {
  display: flex;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: auto;
}

.home-guide-category {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-guide-dot {
  opacity: 0.6;
}

/* ========== §6 Explore tiles ========== */

.home-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.home-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, transform 0.12s;
}

.home-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.home-tile-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.home-tile-name {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.3rem;
  font-weight: 600;
}

.home-tile-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ========== §7 Stats row ========== */

.home-stats-section {
  margin: 2rem 0 1rem;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.home-stat-tile {
  padding: 0.5rem 0.25rem;
}

.home-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.home-stat-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

.home-stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ========== Responsive ========== */

@media (max-width: 900px) {
  .home-guides {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .home-hero h1 {
    font-size: 1.75rem;
  }
  .home-hero-sub {
    font-size: 0.9rem;
  }
  .home-trending {
    grid-template-columns: 1fr;
  }
  .home-comp-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .home-comp-stats {
    width: 100%;
    justify-content: space-between;
  }
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .home-stat-value {
    font-size: 1.6rem;
  }
  .home-search-form {
    flex-direction: column;
  }
  .home-search-region,
  .home-search-input,
  .home-search-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .home-guides {
    grid-template-columns: 1fr;
  }
  .home-tiles {
    grid-template-columns: 1fr;
  }
}
