@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Rajdhani:wght@400;600;700&display=swap');

:root {
  --bg: #050506;
  --panel: rgba(14, 14, 18, 0.9);
  --card: rgba(18, 18, 24, 0.92);
  --text: #f8f7fb;
  --muted: #a6a6b3;
  --accent: #ff2d2d;
  --accent-2: #ff6a6a;
  --accent-3: #ff1010;
  --border: rgba(255, 45, 45, 0.25);
  --glow: rgba(255, 45, 45, 0.45);
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  background: #000;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.container { flex: 1; }

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 15% 15%, rgba(255,45,45,0.18), transparent 42%),
              radial-gradient(circle at 85% 20%, rgba(255,90,90,0.14), transparent 45%),
              radial-gradient(circle at 50% 80%, rgba(255,16,16,0.12), transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 10s ease-in-out infinite;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

.nav { background: rgba(0, 0, 0, 0.85); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-family: 'Orbitron', sans-serif; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: 1px; text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; padding: 0; background: transparent; border: 0; box-shadow: none; }
.brand-logo { height: 56px; width: auto; filter: none; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.menu-toggle { display: none; border: 1px solid var(--border); background: rgba(255,45,45,0.08); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 18px; cursor: pointer; }
.menu-toggle:hover { border-color: rgba(255,45,45,0.55); }
.menu-toggle:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,45,45,0.2); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--text); margin-left: 16px; text-decoration: none; font-weight: 600; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--accent); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }
.nav-links a { display: inline-flex; align-items: center; gap: 8px; }
.nav-icon { font-size: 14px; color: var(--accent-2); }

.hero { padding: 60px 0 30px; }
.hero-card {
  background: linear-gradient(135deg, rgba(22,22,28,0.95), rgba(6,6,8,0.9));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255,45,45,0.18), transparent 55%);
  animation: sweep 8s linear infinite;
  pointer-events: none;
}
.hero h1 { margin: 0 0 8px; font-size: 42px; }

.section { padding: 24px 0 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(255,45,45,0.15);
  border-color: rgba(255,45,45,0.45);
}

.card-title { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.muted { color: var(--muted); }

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0b0f;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 18px var(--glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 26px var(--glow); }
.btn i { margin-right: 6px; }

.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link i { margin-right: 6px; }

h1 i, h2 i { color: var(--accent-2); margin-right: 8px; }

label { display: block; margin: 10px 0 6px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: rgba(8, 8, 10, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,45,45,0.2);
}

.auth { display: grid; place-items: center; padding: 40px 0; }
.auth .card { width: min(520px, 100%); }
.auth form { display: grid; gap: 10px; }
.auth form label { margin: 0; }
.auth form .btn { margin-top: 8px; justify-self: start; }
.auth .cf-turnstile { margin-top: 6px; }

.alert { background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255,80,80,0.4); padding: 10px 12px; border-radius: 10px; }
.success { background: rgba(77,225,255,0.1); border: 1px solid rgba(77,225,255,0.4); padding: 10px 12px; border-radius: 10px; }

.profile-card, .team-card { display: flex; align-items: center; gap: 12px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 2px solid var(--border); }

.roster { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.roster-item { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: rgba(6, 10, 16, 0.6); padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); }

.match-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.badge { background: rgba(255,45,45,0.12); color: var(--accent); padding: 4px 10px; border-radius: 999px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }

.banner { height: 180px; border-radius: 14px; background-size: cover; background-position: center; margin-bottom: 12px; border: 1px solid var(--border); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }

.footer {
  margin-top: 20px;
  padding: 26px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background:
    radial-gradient(circle at 12% 20%, rgba(255,45,45,0.16), transparent 40%),
    linear-gradient(180deg, rgba(12,12,16,0.85), rgba(4,4,6,0.95));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.footer-brand {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.8px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.member-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.mt-20 { margin-top: 20px; }
.mt-10 { margin-top: 10px; }
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.align-start { align-items: flex-start; }

.team-hero {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--team-accent, var(--accent)) 45%, transparent);
}
.team-hero-banner {
  height: 220px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.team-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.65));
}
.team-hero-content {
  margin-top: -72px;
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 0 10px 10px;
}
.team-hero-logo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 20px;
  border: 3px solid var(--team-accent, var(--accent));
  background: rgba(0,0,0,0.5);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.team-tag {
  color: var(--team-accent, var(--accent-2));
  font-size: 0.92em;
}
.team-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
}
.team-stats i {
  color: var(--team-accent, var(--accent-2));
  margin-right: 6px;
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.member-card {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  padding: 12px;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.member-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,45,45,0.55);
}
.member-avatar-large {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,45,45,0.55);
}
.member-name {
  font-weight: 700;
  font-size: 1.08rem;
}
.member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.member-bio {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0b0f;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 0 18px var(--glow);
}
.chat-fab.hidden { display: none; }
.chat-fab.has-alert { animation: chatPulse 1.2s ease-in-out infinite; }
.chat-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: #b30000;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(380px, calc(100vw - 20px));
  height: min(560px, calc(100vh - 28px));
  z-index: 70;
  background: linear-gradient(180deg, rgba(13,13,17,0.98), rgba(5,5,7,0.98));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
}
.chat-widget[hidden] { display: none !important; }

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-title { font-family: 'Orbitron', sans-serif; font-size: 14px; letter-spacing: 0.6px; }
.chat-title i { color: var(--accent-2); }
.chat-close {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 6px 8px;
  cursor: pointer;
}

.chat-channel-bar {
  display: flex;
  gap: 8px;
  padding: 10px 10px 8px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-channel {
  border: 1px solid var(--border);
  background: rgba(255,45,45,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}
.chat-channel.active {
  background: rgba(255,45,45,0.22);
  border-color: rgba(255,45,45,0.55);
}

.chat-messages {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: start;
}
.chat-msg.mine { grid-template-columns: 1fr 32px; }
.chat-msg.mine .chat-avatar { order: 2; }
.chat-msg.mine .chat-bubble { order: 1; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.chat-bubble {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 8px;
}
.chat-msg.mine .chat-bubble { background: rgba(255,45,45,0.12); }
.chat-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.chat-text { white-space: pre-wrap; line-height: 1.35; }
.chat-image-link {
  display: inline-block;
  margin-top: 8px;
}
.chat-image-link img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.chat-controls {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: end;
}
.chat-controls textarea {
  min-height: 42px;
  max-height: 110px;
  resize: vertical;
}
.chat-icon-btn {
  border: 1px solid var(--border);
  background: rgba(255,45,45,0.08);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.chat-file-btn input { display: none; }
.chat-send { height: 40px; padding-top: 0; padding-bottom: 0; }

.chat-emoji-wrap { position: relative; }
.chat-emoji-panel {
  position: absolute;
  left: 0;
  bottom: 46px;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12,12,16,0.96);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.chat-emoji-panel[hidden] { display: none !important; }
.chat-emoji {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  padding: 6px;
  cursor: pointer;
}
.chat-emoji:hover {
  background: rgba(255,45,45,0.12);
  border-color: var(--border);
}

.bracket-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.bracket-col h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
.bracket-match {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}
.bracket-team {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}
.bracket-team strong {
  min-width: 24px;
  text-align: right;
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-inner { flex-wrap: wrap; gap: 10px; }
  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid var(--border);
    background: rgba(8,8,10,0.95);
    border-radius: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    margin-left: 0;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .nav-links a:hover { background: rgba(255,45,45,0.12); }
  .nav-links a::after { display: none; }
}

@media (max-width: 720px) {
  .hero { padding-top: 34px; }
  .hero-card { padding: 24px; }
  .hero h1 { font-size: 32px; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .match-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .profile-card, .team-card { align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-copy { gap: 4px; }
  .team-hero-banner { height: 160px; }
  .team-hero-content {
    margin-top: -48px;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0;
  }
  .team-hero-logo {
    width: 96px;
    height: 96px;
  }
  .team-stats {
    justify-content: center;
  }
  .team-members-grid {
    grid-template-columns: 1fr;
  }
  .member-card {
    grid-template-columns: 72px 1fr;
  }
  .member-avatar-large {
    width: 72px;
    height: 72px;
  }
  .chat-fab {
    right: 12px;
    bottom: 12px;
  }
  .chat-widget {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: min(78vh, 560px);
  }
  .chat-controls {
    grid-template-columns: auto auto 1fr;
  }
  .chat-send {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
  .btn-row {
    width: 100%;
  }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.6; }
}

@keyframes sweep {
  0% { transform: translateX(-10%) translateY(-5%) rotate(0deg); }
  50% { transform: translateX(10%) translateY(5%) rotate(180deg); }
  100% { transform: translateX(-10%) translateY(-5%) rotate(360deg); }
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(255,45,45,0.45); }
  50% { box-shadow: 0 0 26px rgba(255,45,45,0.8); }
}
