/*
 * FlashScore-style feed: left sidebar (countries) + main column (today + favourites)
 */

.feed-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-4);
  max-width: 1440px;
  margin: var(--space-4) auto 0;
  padding: 0 var(--space-4);
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .feed-shell { grid-template-columns: 240px 1fr; }
}
@media (max-width: 768px) {
  .feed-shell { grid-template-columns: 1fr; }
  .feed-sidebar { position: static !important; }
}

/* ======= SIDEBAR ======= */
.feed-sidebar {
  position: sticky;
  top: 120px; /* below header (72px) + ticker (38px) */
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feed-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.feed-side-head h2 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin: 0;
  color: var(--brand-primary);
}

.feed-side-filter {
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
}

.feed-side-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
}

.feed-side-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.feed-country-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.feed-country-list::-webkit-scrollbar { width: 6px; }
.feed-country-list::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }

.feed-country { border-bottom: 1px solid var(--border-subtle); }
.feed-country:last-child { border-bottom: none; }

.feed-country-row {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 100ms;
  user-select: none;
}
.feed-country-row::-webkit-details-marker { display: none; }
.feed-country-row::after {
  content: '›';
  margin-left: auto;
  font-size: 14px;
  color: var(--text-tertiary);
  transition: transform 150ms;
}
.feed-country[open] .feed-country-row::after { transform: rotate(90deg); }
.feed-country-row:hover { background: var(--bg-hover); color: var(--text-primary); }

.feed-flag {
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  display: inline-block;
  vertical-align: middle;
}

.feed-country-name { flex: 1; }

.feed-country-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  padding: 1px 6px;
  border-radius: 9999px;
  margin-right: 4px;
}

.feed-league-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: rgba(0, 0, 0, 0.18);
}

.feed-league-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 38px;
  transition: background-color 100ms;
}

.feed-league-row:hover { background: var(--bg-hover); }
.feed-league-row.is-fav { background: linear-gradient(90deg, rgba(251,191,36,0.06), transparent); }

.feed-league-link {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-league-link:hover { color: var(--brand-primary); }

.feed-star-btn {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 100ms, transform 100ms;
  flex-shrink: 0;
}
.feed-star-btn:hover { color: #fbbf24; transform: scale(1.15); }

.feed-star-btn-lg svg { width: 16px; height: 16px; }

/* ======= MAIN ======= */
.feed-main { min-width: 0; }

.feed-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.feed-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 6px 0 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* "Hi," gets a brand-red gradient + subtle gentle pulse */
.feed-greet {
  background: linear-gradient(135deg, #fbbf24 0%, #dc2626 60%, #b91c1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: feed-greet-pulse 3s ease-in-out infinite;
}
@keyframes feed-greet-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(220,38,38,0)); }
  50%      { filter: drop-shadow(0 0 18px rgba(220,38,38,0.45)); }
}

.feed-name {
  color: white;
}

/* FootClaw paw — replaces the 👋 emoji */
.feed-paw {
  display: inline-flex;
  align-items: center;
  color: #dc2626;
  animation: feed-paw-wave 2.6s ease-in-out infinite;
  transform-origin: 60% 80%;
}
@keyframes feed-paw-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  70%           { transform: rotate(-12deg); }
  80%           { transform: rotate(8deg); }
  90%           { transform: rotate(-4deg); }
}

/* Pulse dot in the "● Your feed" eyebrow */
.feed-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(220,38,38,0.55);
  animation: feed-pulse-ring 1.6s ease-out infinite;
}
@keyframes feed-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(220,38,38,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* Continent chips — smaller, subtler than date chips */
.feed-continent-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  transition: all 120ms;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.feed-continent-chip:hover {
  color: white;
  background: rgba(220,38,38,0.10);
  border-color: rgba(220,38,38,0.40);
}
.feed-continent-chip.active {
  background: linear-gradient(135deg, rgba(220,38,38,0.85), rgba(220,38,38,0.65));
  border-color: rgba(220,38,38,1);
  color: white;
  box-shadow: 0 4px 14px rgba(220,38,38,0.30);
}

.feed-sub { color: var(--text-secondary); font-size: var(--text-sm); margin: 0; }

.feed-head-actions { display: flex; gap: 8px; }

/* Date nav */
.feed-date-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-date-nav::-webkit-scrollbar { display: none; }

.feed-date-chip {
  padding: 7px 16px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 150ms;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.feed-date-chip:hover { color: var(--text-primary); border-color: var(--brand-primary); }
.feed-date-chip.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(220,38,38,0.30);
}
.feed-date-live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: pulse 1.5s infinite;
}

/* Favourites strip */
.feed-favs-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 8px 0 16px;
  margin-bottom: var(--space-4);
  border-bottom: 1px dashed var(--border-default);
}
.feed-favs-strip::-webkit-scrollbar { height: 4px; }

.feed-fav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid rgba(251,191,36,0.40);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 150ms;
}
.feed-fav-chip:hover {
  border-color: #fbbf24;
  background: linear-gradient(90deg, rgba(251,191,36,0.10), transparent);
  transform: translateY(-1px);
}

.feed-fav-icon { font-size: 14px; line-height: 1; }
.feed-fav-team { border-color: rgba(220,38,38,0.40); }
.feed-fav-player { border-color: rgba(59,130,246,0.40); }
.feed-fav-league { border-color: rgba(251,191,36,0.40); }

/* ======= Match list grouped ======= */
.feed-matches-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feed-league-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 150ms;
}
.feed-league-group:hover { border-color: var(--border-strong); }
.feed-league-group.is-fav-league {
  border-color: rgba(251,191,36,0.40);
  background: linear-gradient(180deg, rgba(251,191,36,0.05), var(--bg-surface));
}

.feed-league-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  cursor: pointer;
  transition: background-color 100ms;
  text-decoration: none;
  color: inherit;
}
.feed-league-header:hover {
  background: var(--bg-hover);
}
.feed-league-header:hover .feed-league-title {
  color: var(--brand-primary);
}

.feed-league-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.feed-league-title:hover { color: var(--brand-primary); }

.feed-league-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-left: auto;
  margin-right: 4px;
}

.feed-match-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feed-match-row {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 100ms;
}
.feed-match-row:last-child { border-bottom: none; }
.feed-match-row:hover { background: var(--bg-hover); }
.feed-match-row.is-fav-team {
  background: linear-gradient(90deg, rgba(251,191,36,0.06), transparent);
}
.feed-match-row.is-live::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-primary);
}

.feed-match-link {
  display: grid;
  grid-template-columns: 70px 1fr 24px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  text-decoration: none;
  position: relative;
}

.feed-match-time { display: flex; align-items: center; justify-content: center; }
.feed-match-clock {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
}
.feed-match-ft {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
}
.feed-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--brand-primary);
  color: white;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}
.feed-live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: white;
  animation: pulse 1.5s infinite;
}

.feed-match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.feed-match-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  white-space: nowrap;
}
.feed-match-team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.feed-match-team-away { justify-content: flex-start; }
.feed-match-team .fc-team-logo { width: 20px; height: 20px; }

.feed-match-score {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: center;
}
.feed-match-score.live { color: var(--brand-primary); }

.feed-match-arrow {
  color: var(--text-tertiary);
  font-size: 16px;
  text-align: center;
}

.feed-empty {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.feed-empty::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, var(--brand-primary-soft), transparent 60%);
  pointer-events: none;
}
.feed-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.feed-empty h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}
.feed-empty p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
  max-width: 580px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .feed-match-link { grid-template-columns: 56px 1fr 16px; gap: 8px; padding: 10px 12px; }
  .feed-match-team { font-size: 13px; }
  .feed-match-score { font-size: 13px; min-width: 44px; }
  .feed-league-header { padding: 8px 12px; }
}
