:root {
  --bg-1: #060606;
  --bg-2: #0f1010;
  --bg-3: #171a16;
  --accent: #b9ff39;
  --accent-soft: #d7ff8a;
  --text-main: #f7f8f4;
  --text-soft: #b9bfb1;
  --card-bg: rgba(28, 32, 24, 0.66);
  --card-border: rgba(186, 255, 58, 0.24);
  --radius: 1rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.section {
  scroll-margin-top: 1rem;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 15% 10%, #22310f 0%, transparent 42%),
    radial-gradient(circle at 85% 90%, #1b2810 0%, transparent 40%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(186, 255, 58, 0.2);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-a {
  width: 32rem;
  height: 32rem;
  top: -10rem;
  left: -8rem;
  background: #b9ff39;
}

.bg-glow-b {
  width: 26rem;
  height: 26rem;
  bottom: -8rem;
  right: -8rem;
  background: #4fd1c5;
}

.wrap {
  width: min(100%, 86rem);
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* HERO */
.hero {
  text-align: center;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.pill {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(186, 255, 58, 0.08);
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.3rem;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--text-soft);
  max-width: 40ch;
  margin: 0 auto 1.8rem;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0a0f04;
  box-shadow: 0 10px 30px rgba(186, 255, 58, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(186, 255, 58, 0.32);
}

/* SECTIONS */
.section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.section-note {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-top: 1rem;
}

/* INFO CARDS */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.info-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(36, 42, 30, 0.85),
    rgba(18, 21, 15, 0.72)
  );
  border: 1px solid rgba(186, 255, 58, 0.16);
  border-radius: 1.15rem;
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  backdrop-filter: blur(6px);
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0.6;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(186, 255, 58, 0.4);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.info-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: rgba(186, 255, 58, 0.1);
  border: 1px solid rgba(186, 255, 58, 0.22);
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.info-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.info-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  font-weight: 600;
}

.info-value {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

/* PANEL / FORMAT */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem);
  backdrop-filter: blur(6px);
}

.panel > p {
  color: var(--text-soft);
  font-size: 1.02rem;
}

.panel strong {
  color: var(--text-main);
}

.format-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.step-num {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  background: rgba(186, 255, 58, 0.12);
  border: 1px solid var(--card-border);
  color: var(--accent);
  font-weight: 800;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.step p {
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* RULES / NOTES LIST */
.rules-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.rules-list li {
  position: relative;
  padding: 0.95rem 1rem 0.95rem 2.6rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.8rem;
  color: var(--text-soft);
}

.rules-list li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
}

/* SCHEDULE TABLE */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  -webkit-overflow-scrolling: touch;
}

.schedule {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
}

.schedule th,
.schedule td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.schedule thead th {
  background: rgba(186, 255, 58, 0.12);
  color: var(--accent-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
}

.schedule tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.schedule .time {
  font-weight: 700;
  color: var(--text-main);
}

.schedule tbody tr:last-child td {
  border-bottom: none;
}

.phase-row td {
  color: var(--accent-soft);
  font-weight: 700;
  background: rgba(79, 209, 197, 0.08);
}

/* SCHEDULE — match cells with names */
.schedule {
  min-width: 74rem;
}

.schedule th,
.schedule td {
  min-width: 15rem;
}

.schedule .time,
.schedule thead th:first-child {
  min-width: 5.5rem;
}

.schedule td {
  white-space: nowrap;
  vertical-align: middle;
}

.match {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  line-height: 1.25;
}

.match-team {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-main);
  white-space: nowrap;
}

.match-vs {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.match-vs.score {
  font-size: 0.95rem;
  letter-spacing: 0;
  color: #fff;
  background: rgba(186, 255, 58, 0.14);
  border: 1px solid var(--card-border);
  border-radius: 0.4rem;
  padding: 0.05rem 0.5rem;
}

.match-team.win {
  color: var(--accent);
  font-weight: 800;
}

/* STANDINGS / TABELA BODOVA */
#standings-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 600px) {
  #standings-grid {
    grid-template-columns: 1fr;
  }
}

.standings-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  backdrop-filter: blur(6px);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 20rem;
}

.standings-table th,
.standings-table td {
  padding: 0.55rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  font-size: 0.86rem;
}

.standings-table thead th {
  color: var(--accent-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-table .st-name {
  text-align: left;
  white-space: normal;
  min-width: 11rem;
}

.standings-table .st-pos {
  color: var(--text-soft);
  font-weight: 700;
}

.standings-table .st-pts {
  font-weight: 800;
  color: var(--accent);
}

.standings-table tbody tr:last-child td {
  border-bottom: none;
}

.standings-table tbody tr:nth-child(-n + 2) .st-pos {
  color: var(--accent);
}

.footer-admin {
  color: var(--text-soft);
  font-size: 0.82rem;
  text-decoration: underline;
}

/* GROUPS / EKIPE */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

.group-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  backdrop-filter: blur(6px);
}

.group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  counter-reset: none;
}

.team-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.team-name {
  flex: 1 1 auto;
}

.team-pts {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 2.4rem;
  text-align: right;
  font-weight: 800;
  color: var(--accent);
}

.team-pts small {
  font-weight: 600;
  color: var(--text-soft);
  margin-left: 0.1rem;
}

/* prva dva mesta u grupi istaknuta */
.team-list li:nth-child(-n + 2) .team-no {
  background: var(--accent);
  color: #0a0f04;
  border-color: var(--accent);
}

.team-no {
  flex: 0 0 auto;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.35rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: rgba(186, 255, 58, 0.12);
  border: 1px solid var(--card-border);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

/* BRACKET / NOKAUT */
.bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}

.bracket-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
}

.bracket-tag {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.bracket-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* CONTACT */
.contact-card {
  background: linear-gradient(
    150deg,
    rgba(186, 255, 58, 0.1),
    rgba(28, 32, 24, 0.66)
  );
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
}

.contact-card p {
  color: var(--text-soft);
  max-width: 46ch;
  margin: 0.6rem auto 1.5rem;
}

/* FOOTER */
.footer {
  padding: 2.5rem 0 6rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* STICKY BUTTON */
.sticky-btn {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 50;
  background: var(--accent);
  color: #0a0f04;
  font-weight: 800;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(186, 255, 58, 0.12);
  transition: transform 0.15s ease;
}

.sticky-btn:hover {
  transform: translateY(-2px);
}

/* ===== SCROLL HINT ZA TABELU ===== */
.table-scroll {
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(186, 255, 58, 0.5) transparent;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(186, 255, 58, 0.4);
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== TABLET (do 1024px) ===== */
@media (max-width: 1024px) {
  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .format-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .bracket-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== VEĆI TELEFONI / MANJI TABLETI (do 720px) ===== */
@media (max-width: 720px) {
  .section {
    padding: clamp(1.6rem, 6vw, 2.6rem) 0;
  }

  .format-steps {
    grid-template-columns: 1fr;
  }

  .bracket-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== TELEFON (do 600px) ===== */
@media (max-width: 600px) {
  .hero {
    padding-top: 2.6rem;
  }

  .wrap {
    padding: 0 1rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .info-card {
    min-height: 8.5rem;
    padding: 1.1rem 0.85rem;
  }

  .info-icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .rules-list li {
    padding-left: 2.4rem;
  }

  /* više prostora za horizontalni skrol tabele */
  .table-scroll {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .sticky-btn {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.75rem 1.15rem;
    font-size: 0.92rem;
  }

  .footer {
    padding-bottom: 5rem;
  }
}

/* ===== MALI TELEFON (do 400px) ===== */
@media (max-width: 400px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
  }

  .info-card .info-value {
    margin-top: 0;
    margin-left: auto;
    font-size: 1rem;
  }

  .info-card::before {
    display: none;
  }
}

/* ===== SMANJEN POKRET ZA KORISNIKE KOJI TO ŽELE ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
