:root {
  --bg: #070b16;
  --bg-alt: #0e1528;
  --card: #121b31;
  --line: #25375f;
  --text: #f6f9ff;
  --muted: #9fb3d9;
  --blue: #56bcff;
  --green: #35c57b;
  --danger: #ff6d6d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #1a2a4b, var(--bg)) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1040px, 94vw); margin: 30px auto; }
.center-wrap { width: min(460px, 94vw); margin: 8vh auto 0; }

.card {
  background: linear-gradient(180deg, #17233f, var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.title { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.subtitle { margin: 0 0 16px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.45; }

.grid { display: grid; gap: 10px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
@media (max-width: 840px) { .grid-2 { grid-template-columns: 1fr; } }

label { font-size: 12px; color: var(--muted); font-weight: 700; }
input, textarea, button, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f1930;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
}
textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.45;
}

button {
  background: linear-gradient(180deg, #67c7ff, #3eaef0);
  color: #042038;
  border: none;
  cursor: pointer;
  font-weight: 800;
}
button.secondary { background: #192542; color: #d3e2ff; border: 1px solid var(--line); }
button.green { background: linear-gradient(180deg, #40d486, #2cad6a); color: #032215; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.provider {
  background: #152240;
  border: 1px solid var(--line);
  color: var(--text);
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.msg {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}
.msg.info { background: rgba(86, 188, 255, 0.15); border-color: rgba(86, 188, 255, 0.45); }
.msg.ok { background: rgba(53, 197, 123, 0.16); border-color: rgba(53, 197, 123, 0.45); }
.msg.err { background: rgba(255, 109, 109, 0.16); border-color: rgba(255, 109, 109, 0.48); }

.pill {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1a2848;
  color: #d9e6ff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tile {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #15213d;
}
.tile h3 { margin: 0 0 6px; font-size: 16px; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.home-shell {
  position: relative;
}
.home-shell::before {
  content: "";
  position: absolute;
  inset: -10px -10px auto -10px;
  height: 200px;
  background: radial-gradient(900px 280px at 10% 0%, rgba(80, 130, 255, 0.28), rgba(130, 50, 170, 0.18), transparent);
  pointer-events: none;
}
.home-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.home-logo {
  font-weight: 900;
  letter-spacing: 0.3px;
}
.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #233760, #1a294b);
  color: #dfe9ff;
  padding: 0;
}
.search-btn {
  width: auto;
  min-width: 60px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5ec7ff, #44aee8);
}
.menu-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111b32;
}
/* Ensure native hidden attribute always wins for toggled panels. */
[hidden] {
  display: none !important;
}
.home-hero {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}
.home-actions {
  margin-bottom: 12px;
}
.action-tile {
  display: grid;
  gap: 10px;
}
.action-btn {
  width: auto;
}

/* Home: Favorites rail (web parity with PlayersCarouselView) */
.favorites-section {
  margin-bottom: 12px;
}
.favorites-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.favorites-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.favorites-rail-wrap {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #141a26;
  overflow: hidden;
}
.favorites-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 14px;
  scroll-snap-type: x proximity;
}
.favorites-rail::-webkit-scrollbar {
  height: 6px;
}
.favorites-rail::-webkit-scrollbar-thumb {
  background: #2a3f6a;
  border-radius: 999px;
}
.fav-card {
  flex: 0 0 auto;
  width: 92px;
  scroll-snap-align: start;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.fav-card .avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1e2a44;
  object-fit: cover;
}
.fav-card .avatar.ph {
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #dfe9ff;
}
.fav-card .name {
  font-size: 12px;
  font-weight: 700;
  color: #e8f1ff;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.fav-card .sub {
  font-size: 10px;
  font-weight: 700;
  color: #8fa6d4;
  margin-top: 2px;
}
.favorites-empty {
  padding: 12px 14px 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
/* Home feed (parity with HomeFavoritesFeedView — GET mobile/home/favorites-feed) */
.home-feed {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #141a26;
}
.home-feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.home-feed-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.home-feed-sub {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #15213d;
  overflow: hidden;
}
.feed-card__main {
  display: block;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}
.feed-card--highlight .feed-card__main {
  padding-bottom: 12px;
}
.feed-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}
.feed-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1a294b;
  color: #b8c8e8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.feed-like-btn.is-liked {
  color: #ff8fab;
  border-color: rgba(255, 143, 171, 0.45);
  background: rgba(255, 143, 171, 0.1);
}
.feed-like-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.feed-like-icon {
  font-size: 14px;
  line-height: 1;
}
.feed-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.feed-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #1e2a44;
  flex-shrink: 0;
}
.feed-card__avatar.sm {
  width: 36px;
  height: 36px;
}
.feed-card__avatar.ph {
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #dfe9ff;
}
.feed-card__meta {
  flex: 1;
  min-width: 0;
}
.feed-card__player {
  font-size: 14px;
  font-weight: 800;
  color: #e8f1ff;
  line-height: 1.2;
}
.feed-card__kind {
  font-size: 11px;
  font-weight: 700;
  color: #8fa6d4;
  margin-top: 2px;
}
.feed-card__watch {
  flex-shrink: 0;
  width: auto;
  min-width: 72px;
  padding: 8px 12px;
  font-size: 12px;
}
.feed-card__thumb-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1528;
  margin-bottom: 10px;
}
.feed-card__thumb {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}
.feed-card__thumb--ph {
  min-height: 120px;
  display: grid;
  place-items: center;
}
.feed-card__ph {
  font-size: 28px;
  font-weight: 800;
  color: #8fa6d4;
}
.feed-card__title {
  font-size: 15px;
  font-weight: 800;
  color: #e8f1ff;
  line-height: 1.3;
}
.feed-card__line {
  margin-top: 6px;
  font-size: 13px;
  color: #b8c8e8;
  line-height: 1.35;
}
.feed-card__date {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #7a8fb8;
}
.feed-card--game .feed-card__main:hover {
  background: rgba(80, 130, 255, 0.06);
}
