:root {
  --bg: #000000;
  --card: #121212;
  --text: #e0e0e0;
  --muted: #888888;
  --accent: #5aaac6;
  --badge: #333;
  --badge-text: #fff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
}

a { color: inherit; }

/* Header */
.app-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid #222;
  padding: 12px 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand, .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #fff;
  font-size: 24px;
  position: relative;
  overflow: visible; /* Changed to visible for effects */
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.5px;
}

.brand span, .nav-brand span {
  background: linear-gradient(to right, #ffffff 0%, #a5d8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(165, 216, 255, 0.3);
}

.brand img, .nav-brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(90, 170, 198, 0.6));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand:hover img, .nav-brand:hover img {
  transform: rotate(15deg) scale(1.1);
}

.brand::after, .nav-brand::after {
  display: none; /* Removed the previous shine effect as it conflicts with text gradient */
}

/* Navbar */
.nav-sports {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 8px;
  flex: 1;
  justify-content: center;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.nav-sports::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.nav-sports a {
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-sports a:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #5865F2;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #4752c4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-left: auto;
  transition: all 0.2s;
}
.discord-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}
.discord-btn svg { width: 20px; height: 20px; }

/* Main Layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}

main.watch {
  max-width: 1600px;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.page-title {
  margin: 12px 0 8px;
  font-size: 24px;
  color: #fff;
}

/* Search */
.search { margin: 24px 0; }
.search input {
  width: 100%;
  background: #121212;
  border: 1px solid #333;
  padding: 14px 20px;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.search input:focus {
  border-color: var(--accent);
  background: #161616;
  box-shadow: 0 0 0 3px rgba(90, 170, 198, 0.15);
}
.search input::placeholder { color: #666; }

/* Schedule List */
#schedule {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.league-header {
  font-size: 20px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 16px;
}

.league-header img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.league-header img:hover {
  transform: scale(1.1) rotate(5deg);
}

.match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(145deg, #181818, #121212);
  border: 1px solid #252525;
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.match:hover {
  background: linear-gradient(145deg, #202020, #181818);
  border-color: #444;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.match:active {
  transform: translateY(0);
}

.teams {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.team {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #e0e0e0;
  font-size: 17px;
  font-weight: 700;
  transition: color 0.2s;
}

.match:hover .team { color: #fff; }

.team img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.status {
  font-size: 12px;
  font-weight: 700;
  color: #ccc;
  background: linear-gradient(145deg, #252525, #1a1a1a);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #333;
  min-width: 100px;
  text-align: center;
  margin-left: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.status.live {
  background: linear-gradient(145deg, #d32f2f, #b71c1c);
  color: #fff;
  border-color: #ef5350;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

.badge {
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* MethStreams Style Buttons */
.meth-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.meth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.meth-bookmark-box {
  font-size: 18px;
  line-height: 1.6;
  color: #ddd;
  margin-bottom: 25px;
  background: #181818;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #333;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.meth-matches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.meth-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid #333;
  padding: 15px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
}

.meth-btn:hover {
  background: #2a2a2a;
  border-color: var(--accent);
  transform: translateX(4px);
}

.meth-btn .match-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 15px;
}

.meth-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-live {
  background: #ff4444;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-upcoming {
  background: #333;
  color: #aaa;
}

.dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

/* Match Details */
#details {
  background: var(--card);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: flex-start;
}

/* Special Styling for Sport Page Backlinks */
.meth-container #top-links {
  gap: 15px;
  margin-top: 15px;
}

.meth-container #top-links a {
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #000;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  transform: skew(-10deg);
}

.meth-container #top-links a span {
  display: inline-block;
  transform: skew(10deg); /* Counter-skew text */
}

.meth-container #top-links a:nth-child(2n) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.meth-container #top-links a:nth-child(3n) {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #004d40;
  box-shadow: 0 4px 15px rgba(132, 250, 176, 0.3);
}

.meth-container #top-links a:nth-child(4n) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(250, 112, 154, 0.3);
}

.meth-container #top-links a:nth-child(5n) {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(161, 140, 209, 0.3);
}

.meth-container #top-links a:hover {
  transform: skew(-10deg) translateY(-3px) scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
  z-index: 10;
}

#player + #top-links,
.league-header + #top-links,
#top-links.right-aligned {
  justify-content: flex-end;
}

#top-links.center-aligned {
  justify-content: center !important;
}

#details .links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #333;
  padding-top: 20px;
}

#details .links a,
#top-links a {
  background: linear-gradient(145deg, #252525, #1a1a1a);
  border: 1px solid #333;
  color: #ccc;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#details .links a:hover,
#top-links a:hover {
  background: linear-gradient(145deg, #333, #252525);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Player */
#player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  margin-bottom: 30px;
}

#player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Backlinks Footer */
.backlinks-footer {
  margin: 40px auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 1000px;
  padding: 0 16px;
}

.backlinks-footer a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(145deg, #1e1e1e, #161616);
  border: 1px solid #333;
  border-radius: 999px;
  padding: 10px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.backlinks-footer a:hover {
  background: linear-gradient(145deg, #2a2a2a, #202020);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 170, 198, 0.2);
}

.backlinks-footer a:active {
  transform: translateY(0);
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 24px 16px;
  background: var(--card);
  border-top: 1px solid #333;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.site-footer .links {
  margin: 16px 0 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer .links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 6px 14px;
  transition: all 0.2s;
}

.site-footer .links a:hover {
  background: #2a2a2a;
  color: #fff;
  border-color: #555;
}

@media (max-width: 768px) {
  .match { flex-direction: column; align-items: flex-start; }
  .teams { flex-direction: column; align-items: flex-start; gap: 10px; }
  .right-controls { width: 100%; justify-content: space-between; margin-top: 10px; }
}

/* Loader & Utilities */
#loader {
  text-align: center;
  font-size: 18px;
  color: var(--muted);
  margin: 40px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: pulse 1.5s infinite;
}

.hidden { display: none !important; }

/* Footer */
.app-footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  border-top: 1px solid #222;
  color: var(--muted);
  font-size: 14px;
}

.app-footer p {
  margin: 8px 0;
}

.app-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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