:root {
  --red: #9b0000;
  --red-dark: #240000;
  --gold: #facc15;
  --white: #ffffff;

  --glass: rgba(60, 0, 0, 0.62);
  --glass-strong: rgba(120, 0, 0, 0.72);

  --border: rgba(250, 204, 21, 0.28);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--white);

  background:
    linear-gradient(rgba(20, 0, 0, 0.72), rgba(10, 0, 0, 0.92)),
    url("images/stadium.png");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background:
    radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.18), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.18), transparent 28%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);

  background-size: auto, auto, 42px 42px, 42px 42px;
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  text-align: center;
}

/* HERO */

.hero,
.header1 {
  position: relative;
  overflow: hidden;
  padding: 56px 24px;
  margin-bottom: 34px;
  border-radius: 30px;

  background:
    linear-gradient(
      135deg,
      rgba(155, 0, 0, 0.88),
      rgba(30, 0, 0, 0.86)
    );

  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.logo {
  width: 112px;
  display: block;
  margin: 20px auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
}

h1,
h2,
h3 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  margin-bottom: 10px;
  color: var(--white);
  text-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
}

h2,
h3 {
  color: var(--gold);
}

/* BUTTONS */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 44px auto;
}

.grid .btn {
  min-height: 70px;
}

.btn,
.generation-button {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px 22px;
  border-radius: 22px;

  background:
    linear-gradient(
      135deg,
      rgba(155, 0, 0, 0.92),
      rgba(70, 0, 0, 0.92)
    );

  color: var(--gold);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.8px;

  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  transition: 0.22s ease;
}

.btn:hover,
.generation-button:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.58);
}

/* SPECIAL BUTTONS */

.schedule-btn {
  background: linear-gradient(135deg, #facc15, #eab308) !important;
  color: #9b0000 !important;
}

.rules-btn {
  background: linear-gradient(135deg, #facc15, #eab308) !important;
  color: #1a1a1a !important;
}

.location-btn {
  background: linear-gradient(135deg, #ffffff, #d4d4d4) !important;
  color: #111111 !important;
}

/* SPONSORS */

.sponsors-ticker {

  width: 100%;

  overflow: hidden;

  margin-top: 35px;
  margin-bottom: 45px;

  padding: 18px 0;

  border-radius: 18px;

  border: 1px solid rgba(250, 204, 21, 0.18);

  background:
    linear-gradient(
      90deg,
      rgba(90, 0, 0, 0.95),
      rgba(30, 0, 0, 0.98)
    );

  box-shadow:
    0 18px 45px rgba(0,0,0,0.38);

  position: relative;
}

.sponsors-ticker::before,
.sponsors-ticker::after {

  content: "";

  position: absolute;

  top: 0;

  width: 120px;
  height: 100%;

  z-index: 2;

  pointer-events: none;
}

.sponsors-ticker::before {

  left: 0;

  background:
    linear-gradient(
      to right,
      rgba(40, 0, 0, 1),
      transparent
    );
}

.sponsors-ticker::after {

  right: 0;

  background:
    linear-gradient(
      to left,
      rgba(40, 0, 0, 1),
      transparent
    );
}

.sponsors-track {

  display: flex;

  align-items: center;

  gap: 40px;

  width: max-content;

  padding-right: 120px;

  animation: scrollSponsors 60s linear infinite;
}

.sponsors-track span {

  color: #facc15;

  font-size: 17px;

  font-weight: 900;

  letter-spacing: 2px;

  white-space: nowrap;

  text-transform: uppercase;

  text-shadow:
    0 0 12px rgba(250, 204, 21, 0.22);
}

.sponsors-track:hover {

  animation-play-state: paused;
}

@keyframes scrollSponsors {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* CARDS */

.group,
.match,
.recent-results,
.schedule-box,
.age-card,
.box,
.resultbox {
  background:
    linear-gradient(
      180deg,
      var(--glass-strong),
      var(--glass)
    );

  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

/* RASPORED PAGE */

.terrain-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 34px;
}

.terrain-btn {
  padding: 16px 34px;
  border: none;
  border-radius: 20px;
  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      rgba(120, 0, 0, 0.95),
      rgba(70, 0, 0, 0.95)
    );

  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;

  transition: 0.22s ease;

  box-shadow:
    0 14px 32px rgba(0,0,0,0.38);

  border: 1px solid rgba(250,204,21,0.18);
}

.terrain-btn:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.terrain-btn.active {
  background:
    linear-gradient(
      135deg,
      #facc15,
      #eab308
    );

  color: #7f0000;

  box-shadow:
    0 0 28px rgba(250,204,21,0.35);
}

.generation-content {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
}

.generation-content.active {
  display: block;
}

.teren-card {
  padding: 30px;
  border-radius: 30px;

  background:
    linear-gradient(
      180deg,
      rgba(120, 0, 0, 0.82),
      rgba(45, 0, 0, 0.82)
    );

  border: 1px solid rgba(250,204,21,0.22);

  backdrop-filter: blur(12px);

  box-shadow:
    0 22px 50px rgba(0,0,0,0.48);
}

.teren-card h2 {
  margin-bottom: 26px;
  color: var(--gold);
  font-size: 34px;
  letter-spacing: 2px;
}

.teren-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
}

.teren-table th {
  background: rgba(250,204,21,0.14);
  color: var(--gold);
  padding: 16px;
  font-size: 14px;
  text-transform: uppercase;
}

.teren-table td {
  background: rgba(255,255,255,0.06);
  padding: 18px 16px;
  font-size: 16px;
  font-weight: 800;
}

.teren-table tr:hover td {
  background: rgba(250,204,21,0.08);
}

.teren-table td:first-child {
  width: 160px;
  color: var(--gold);
  border-radius: 18px 0 0 18px;
}

.teren-table td:last-child {
  border-radius: 0 18px 18px 0;
}

/* MOBILE */

@media (max-width: 768px) {

  body {
    background-attachment: scroll;
  }

  .container {
    padding: 18px 12px 40px;
  }

  .hero,
  .header1 {
    padding: 36px 18px;
    border-radius: 24px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .terrain-buttons {
    gap: 12px;
  }

  .terrain-btn {
    width: 100%;
    font-size: 16px;
    padding: 15px 18px;
  }

  .teren-card {
    padding: 18px;
    overflow-x: auto;
  }

  .teren-card h2 {
    font-size: 26px;
  }

  .teren-table {
    min-width: 640px;
  }

  .teren-table th,
  .teren-table td {
    padding: 12px 10px;
    font-size: 13px;
  }

  .teren-table td:first-child {
    width: 120px;
  }

  .sponsors-ticker {

    margin-top: 25px;
    margin-bottom: 30px;

    padding: 14px 0;
  }

  .sponsors-track {

    gap: 26px;

    padding-right: 60px;

    animation: scrollSponsors 45s linear infinite;
  }

  .sponsors-track span {

    font-size: 13px;

    letter-spacing: 1px;
  }

  .sponsors-ticker::before,
  .sponsors-ticker::after {

    width: 45px;
  }
}