/* ========================================
   星空体育电竞 - 全局样式
   仿 esports.op.gg 配色方案
   ======================================== */

/* CSS Variables */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #202040;
  --bg-card-hover: #2a2a4a;
  --bg-dark: #0f0f23;
  --bg-input: #2a2a4a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent-green: #4ade80;
  --accent-yellow: #f5a623;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-orange: #f97316;
  --accent-purple: #8b5cf6;
  --border-color: #2d2d4a;
  --border-light: #3d3d5a;
  --live-red: #ef4444;
  --win-green: #4ade80;
  --lose-red: #ef4444;
  --nav-height: 48px;
  --ticker-height: 40px;
  --subnav-height: 56px;
  --sidebar-width: 280px;
  --max-width: 1200px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-green);
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select {
  font-family: inherit;
  color: inherit;
}

/* ========================================
   Top Navigation Bar
   ======================================== */
.top-nav {
  background: var(--bg-dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.top-nav .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-green);
  margin-right: 24px;
  white-space: nowrap;
}

.top-nav .logo svg {
  width: 24px;
  height: 24px;
}

.top-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.top-nav .nav-links::-webkit-scrollbar {
  display: none;
}

.top-nav .nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav .nav-links a:hover,
.top-nav .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.top-nav .nav-links a .badge {
  background: var(--accent-green);
  color: var(--bg-dark);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
}

.top-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.top-nav .nav-right .btn-lang {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.top-nav .nav-right .btn-signin {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  background: var(--accent-green);
  color: var(--bg-dark);
  font-weight: 600;
}

.top-nav .nav-right .btn-signin:hover {
  background: #22c55e;
}

/* ========================================
   Match Ticker (Scrolling bar)
   ======================================== */
.match-ticker {
  background: var(--bg-secondary);
  height: var(--ticker-height);
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 0 10px;
}

.ticker-wrapper::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  white-space: nowrap;
  border-right: 1px solid var(--border-color);
  min-width: fit-content;
  cursor: pointer;
  transition: var(--transition);
}

.ticker-item:hover {
  background: var(--bg-card);
}

.ticker-item .game-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.ticker-item .game-tag.lol { background: #1a5276; color: #5dade2; }
.ticker-item .game-tag.val { background: #7d3c98; color: #d2b4de; }
.ticker-item .game-tag.pubg { background: #7d6608; color: #f9e79f; }

.ticker-item .live-badge {
  background: var(--live-red);
  color: white;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ticker-item .team-name {
  font-weight: 600;
  font-size: 12px;
}

.ticker-item .team-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.ticker-item .vs-text {
  color: var(--text-muted);
  font-size: 11px;
}

.ticker-item .match-time {
  color: var(--text-muted);
  font-size: 11px;
}

/* ========================================
   Sub Navigation (Game + League selector)
   ======================================== */
.sub-nav {
  position: fixed;
  top: calc(var(--nav-height) + var(--ticker-height));
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
}

.sub-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.game-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.game-selector a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.game-selector a.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.game-selector a:hover {
  color: var(--text-primary);
}

.game-selector .search-box {
  margin-left: auto;
  position: relative;
}

.game-selector .search-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px 6px 32px;
  font-size: 13px;
  color: var(--text-primary);
  width: 220px;
  outline: none;
}

.game-selector .search-box input:focus {
  border-color: var(--accent-green);
}

.game-selector .search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

/* League Selector */
.league-selector {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
  overflow-x: auto;
}

.league-selector::-webkit-scrollbar {
  display: none;
}

.league-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  min-width: 70px;
}

.league-item:hover {
  background: var(--bg-card);
}

.league-item.active {
  background: var(--bg-card);
}

.league-item .league-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.league-item .league-name {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.league-item.active .league-name {
  color: var(--accent-green);
}

/* ========================================
   Page Navigation Tabs
   ======================================== */
.page-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.page-tabs a {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.page-tabs a:hover {
  color: var(--text-primary);
}

.page-tabs a.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

/* ========================================
   Main Content Area
   ======================================== */
.main-wrapper {
  padding-top: calc(var(--nav-height) + var(--ticker-height) + 120px);
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 60px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  min-width: 0;
}

/* ========================================
   Cards & Sections
   ======================================== */
.section-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header .more-link {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-header .more-link:hover {
  color: var(--accent-green);
}

.section-body {
  padding: 16px 20px;
}

/* Anti-Spoiler Toggle */
.anti-spoiler {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-input);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-switch.active {
  background: var(--accent-green);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: var(--transition);
}

.toggle-switch.active::after {
  left: 18px;
}

/* ========================================
   Match Schedule Items
   ======================================== */
.match-day {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.match-day:last-child {
  border-bottom: none;
}

.match-day-header {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-day-header .today-badge {
  background: var(--accent-green);
  color: var(--bg-dark);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.match-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-secondary);
}

.match-item:hover {
  background: var(--bg-card-hover);
}

.match-item .match-time {
  font-size: 13px;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
}

.match-item .match-status {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
}

.match-item .match-status.live {
  background: var(--live-red);
  color: white;
  animation: pulse 1.5s infinite;
}

.match-item .match-status.over {
  background: var(--bg-input);
  color: var(--text-muted);
}

.match-item .team-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.match-item .team-info .team-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.match-item .team-info .team-name {
  font-weight: 600;
  font-size: 14px;
  min-width: 40px;
}

.match-item .vs-badge {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0 12px;
}

.match-item .score {
  font-size: 16px;
  font-weight: 700;
  margin: 0 4px;
}

.match-item .score.win {
  color: var(--win-green);
}

.match-item .score.lose {
  color: var(--lose-red);
}

.match-item .match-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 16px;
}

/* ========================================
   Standings Table
   ======================================== */
.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.standings-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.standings-table tr:hover {
  background: var(--bg-card-hover);
}

.standings-table .rank {
  font-weight: 700;
  width: 40px;
  text-align: center;
}

.standings-table .team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.standings-table .team-cell img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.standings-table .win-rate {
  color: var(--accent-green);
}

.standings-table .last-matches {
  display: flex;
  gap: 3px;
}

.standings-table .last-matches .match-dot {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.standings-table .last-matches .match-dot.w {
  background: var(--win-green);
  color: var(--bg-dark);
}

.standings-table .last-matches .match-dot.l {
  background: var(--lose-red);
  color: white;
}

.standings-table .last-matches .match-dot.none {
  background: var(--bg-input);
  color: var(--text-muted);
}

/* ========================================
   Champion Stats
   ======================================== */
.champion-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.champion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.champion-item:hover {
  background: var(--bg-card-hover);
}

.champion-item .rank-num {
  font-size: 14px;
  font-weight: 700;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.champion-item .rank-num:first-child {
  color: var(--accent-yellow);
}

.champion-item .champ-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.champion-item .champ-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.champion-item .champ-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
}

/* ========================================
   Player Card
   ======================================== */
.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.player-card .player-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
}

.player-card .player-info h3 {
  font-size: 16px;
  font-weight: 700;
}

.player-card .player-info .player-team {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   Countdown Timer
   ======================================== */
.countdown-box {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}

.countdown-timer .time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-timer .time-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-green);
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 56px;
}

.countdown-timer .time-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

.countdown-timer .time-sep {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 50px;
}

.countdown-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.countdown-teams .team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.countdown-teams .team img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.countdown-teams .team span {
  font-weight: 700;
  font-size: 16px;
}

.countdown-teams .vs {
  color: var(--text-muted);
  font-weight: 700;
}

/* ========================================
   Prediction Bar
   ======================================== */
.prediction-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.prediction-bar .pct {
  font-size: 13px;
  font-weight: 700;
  min-width: 50px;
}

.prediction-bar .pct.left {
  text-align: right;
  color: var(--accent-blue);
}

.prediction-bar .pct.right {
  text-align: left;
  color: var(--accent-red);
}

.prediction-bar .bar-track {
  flex: 1;
  height: 8px;
  background: var(--accent-red);
  border-radius: 4px;
  overflow: hidden;
}

.prediction-bar .bar-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ========================================
   News Cards
   ======================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.news-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-green);
}

.news-card:first-child {
  grid-column: 1 / -1;
}

.news-card .news-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card:first-child .news-image {
  height: 240px;
}

.news-card .news-content {
  padding: 14px;
}

.news-card .news-source {
  font-size: 11px;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.news-card .news-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================
   Comments / Reactions
   ======================================== */
.comment-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
}

.comment-card .comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-card .comment-user {
  font-size: 13px;
  font-weight: 600;
}

.comment-card .comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-card .comment-match {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.comment-card .comment-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   Banner / Hero Section
   ======================================== */
.hero-banner {
  position: relative;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,26,46,0.9) 0%, rgba(26,26,46,0.3) 100%);
  display: flex;
  align-items: center;
  padding: 40px;
}

.hero-banner .banner-content h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-banner .banner-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero-banner .banner-content .btn-cta {
  background: var(--accent-green);
  color: var(--bg-dark);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  display: inline-block;
}

.hero-banner .banner-content .btn-cta:hover {
  background: #22c55e;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col .footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0;
}

.footer-col a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom .copyright {
  font-size: 11px;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent-green);
  color: var(--bg-dark);
}

/* ========================================
   Customer Service Chat Widget
   ======================================== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-green);
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
  transition: var(--transition);
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  display: none;
  overflow: hidden;
}

.chat-panel.active {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-panel-header {
  background: var(--accent-green);
  color: var(--bg-dark);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-panel-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.chat-panel-header .close-chat {
  font-size: 20px;
  cursor: pointer;
  color: var(--bg-dark);
}

.chat-messages {
  height: 300px;
  padding: 16px;
  overflow-y: auto;
}

.chat-msg {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.chat-msg.bot .msg-bubble {
  background: var(--bg-secondary);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 13px;
  max-width: 80%;
  color: var(--text-primary);
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.chat-msg.user .msg-bubble {
  background: var(--accent-green);
  color: var(--bg-dark);
  border-radius: 12px 12px 4px 12px;
  padding: 10px 14px;
  font-size: 13px;
  max-width: 80%;
}

.chat-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--accent-green);
}

.chat-input-area button {
  background: var(--accent-green);
  color: var(--bg-dark);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}

/* ========================================
   Match Animation
   ======================================== */
.match-animation {
  position: relative;
  padding: 30px;
  text-align: center;
}

.match-animation .team-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.match-animation .team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.match-animation .team-side img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 3px solid var(--border-color);
  transition: var(--transition);
}

.match-animation .team-side.winner img {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.match-animation .vs-center {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow: 0 0 20px rgba(245, 166, 35, 0.3);
  animation: vsGlow 2s infinite;
}

@keyframes vsGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(245, 166, 35, 0.3); }
  50% { text-shadow: 0 0 40px rgba(245, 166, 35, 0.6); }
}

.match-animation .score-display {
  font-size: 48px;
  font-weight: 900;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.match-animation .score-display .s-win {
  color: var(--win-green);
}

.match-animation .score-display .s-lose {
  color: var(--lose-red);
}

.match-animation .score-display .s-sep {
  color: var(--text-muted);
}

/* ========================================
   Video Section
   ======================================== */
.video-section {
  margin-bottom: 20px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========================================
   Tabs (Sub-tabs within pages)
   ======================================== */
.sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sub-tabs a, .sub-tabs button {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  background: none;
}

.sub-tabs a:hover, .sub-tabs button:hover {
  color: var(--text-primary);
}

.sub-tabs a.active, .sub-tabs button.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

/* ========================================
   Stats Table
   ======================================== */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}

.stats-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.stats-table tr:hover {
  background: var(--bg-card-hover);
}

.stats-table .player-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-table .player-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* ========================================
   Filter Controls
   ======================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.filter-bar select:focus {
  border-color: var(--accent-green);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent-green);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #22c55e;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-green);
}

.btn-outline {
  background: transparent;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.btn-outline:hover {
  background: var(--accent-green);
  color: var(--bg-dark);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-nav .nav-links {
    display: none;
  }
  .hero-banner {
    height: 200px;
  }
  .hero-banner .banner-content h1 {
    font-size: 20px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .match-animation .team-vs {
    gap: 20px;
  }
  .match-animation .team-side img {
    width: 60px;
    height: 60px;
  }
  .match-animation .score-display {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding-left: 10px;
    padding-right: 10px;
  }
  .chat-panel {
    width: 300px;
    right: -10px;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-yellow { color: var(--accent-yellow); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none; }

/* Show More Button */
.show-more {
  text-align: center;
  padding: 12px;
}

.show-more button {
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 24px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.show-more button:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Loading animation */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pro Build items */
.build-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.build-item:hover {
  background: var(--bg-card-hover);
}

.build-item .build-champ {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.build-item .build-player {
  font-size: 13px;
  font-weight: 600;
}

.build-item .build-team {
  font-size: 11px;
  color: var(--text-muted);
}

.build-item .build-items {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.build-item .build-items .item-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--bg-input);
}

/* Download page */
.download-hero {
  text-align: center;
  padding: 60px 20px;
}

.download-hero h1 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 16px;
}

.download-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 28px;
  transition: var(--transition);
}

.download-btn:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.download-btn .dl-icon {
  font-size: 28px;
}

.download-btn .dl-text {
  text-align: left;
}

.download-btn .dl-text .dl-label {
  font-size: 11px;
  color: var(--text-muted);
}

.download-btn .dl-text .dl-store {
  font-size: 16px;
  font-weight: 700;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.feature-card .feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
}
