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

:root {
  --yellow: #EAF547;
  --dark: #1E1E3F;
  --blue-light: #25557F;
  --white: #FFFFFF;
  --black: #000000;
  --radius: 16px;
  --max-w: 1280px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Courier Prime', monospace;
  color: var(--dark);
  line-height: 1.5;
  font-size: 16px;
  background: var(--white);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 64px;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: none;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  border: 1px solid var(--yellow);
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.85;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--dark);
}

.btn-dark {
  background: var(--dark);
  color: var(--yellow);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--yellow);
  color: var(--dark);
}

.btn-underline {
  text-decoration: underline;
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ===== Navbar ===== */
.navbar {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--black);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.navbar-logo {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-lpdo {
  font-size: 36px;
  line-height: 36px;
}

.logo-rest {
  font-size: 32px;
  line-height: 36px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links {
  display: flex;
  gap: 32px;
}

.navbar-links a {
  color: var(--yellow);
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  line-height: 1.5;
  transition: opacity 0.2s;
}

.navbar-links a:hover {
  opacity: 0.7;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--yellow);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  background: var(--yellow);
  padding: 112px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 96px;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-logo {
  width: 142px;
  height: 200px;
}

.hero-logo-graphic,
.footer-logo-graphic {
  position: relative;
  width: 142px;
  height: 200px;
}

.logo-part {
  position: absolute;
}

.logo-part.logo-group {
  left: 0;
  top: 28.7%;
  width: 85.28%;
  height: 69.56%;
}

.logo-part.logo-rect {
  left: 57.06%;
  top: 30.43%;
  width: 42.94%;
  height: 69.57%;
  transform: rotate(180deg);
}

.logo-part.logo-knight {
  left: 64.52%;
  top: 0;
  width: 26.89%;
  height: 30.43%;
  transform: rotate(180deg) scaleY(-1);
}

.logo-text-overlay {
  position: absolute;
  left: 12.27%;
  top: 37.39%;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 20.87px;
  line-height: 20.87px;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  flex-direction: column;
}

.logo-text-dark {
  color: var(--dark);
}

.hero h1 {
  font-size: 64px;
  line-height: 1.2;
  color: var(--dark);
}

.hero-desc {
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  color: var(--dark);
}

.hero-device {
  flex-shrink: 0;
  width: 479px;
}

.device-frame {
  position: relative;
  width: 100%;
  padding-top: 167%; /* aspect ratio of tablet */
  background: #111;
  border-radius: 23px;
  border: 8px solid #4a4a4b;
  box-shadow: 10px 10px 26px rgba(0,0,0,0.35), 42px 42px 78px rgba(0,0,0,0.25);
  overflow: hidden;
}

.device-screen {
  position: absolute;
  top: 6%;
  left: 5%;
  right: 5%;
  bottom: 2%;
  border-radius: 2px;
  overflow: hidden;
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Prizes ===== */
.prizes {
  background: rgba(37, 85, 127, 0.05);
  padding: 112px 0;
  position: relative;
  overflow: hidden;
}

.section-title {
  font-size: 48px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 80px;
  color: var(--black);
}

.section-title-light {
  color: var(--yellow);
}

.prize-cards {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 32px;
}

.prize-card {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 24px;
  width: 179px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prize-place {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
}

.prize-amount {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  color: var(--yellow);
  text-align: center;
}

.info-cards {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.info-card {
  background: var(--yellow);
  border-radius: var(--radius);
  padding: 24px;
  width: 320px;
  text-align: center;
}

.info-card p {
  font-family: 'Courier Prime', monospace;
  font-size: 20px;
  line-height: 1.5;
  color: var(--dark);
}

/* Chessboard decorations — 3x3 macro grid, each filled square has a dense micro checkerboard */
.chessboard-decoration {
  position: absolute;
  width: 576px;
  height: 576px;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(3, 192px);
  grid-template-rows: repeat(3, 192px);
  mix-blend-mode: darken;
  z-index: 0;
}

.prizes > .container,
.tournaments > .container {
  position: relative;
  z-index: 1;
}

.chessboard-decoration .cb-cell:nth-child(1),
.chessboard-decoration .cb-cell:nth-child(3),
.chessboard-decoration .cb-cell:nth-child(5),
.chessboard-decoration .cb-cell:nth-child(7),
.chessboard-decoration .cb-cell:nth-child(9) {
  background-image: repeating-conic-gradient(#666 0% 25%, transparent 0% 50%);
  background-size: 32px 32px;
}

.chessboard-top-right {
  top: -177px;
  right: 0px;
  transform: rotate(-17deg);
}

.chessboard-bottom-left {
  bottom: -200px;
  left: 0px;
  transform: rotate(-19deg);
}

/* ===== Tour Standing ===== */
.standing {
  background: var(--dark);
  padding: 112px 0;
}

.table-wrapper {
  max-width: 1024px;
  margin: 0 auto;
  overflow-x: auto;
}

.standing-table,
.tournaments-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
}

.standing-table thead th,
.tournaments-table thead th {
  background: var(--dark);
  color: var(--yellow);
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--white);
  white-space: nowrap;
}

.standing-table tbody tr:nth-child(odd) td {
  background: var(--yellow);
}

.standing-table tbody tr:nth-child(even) td {
  background: var(--white);
}

.standing-table tbody td {
  padding: 28px 24px;
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dark);
  border-bottom: 1px solid var(--dark);
  height: 116px;
  vertical-align: middle;
}

.standing-table .col-standing {
  width: 148px;
  text-align: center;
}

.standing-table tbody .col-standing {
  font-size: 40px;
}

.standing-table tbody tr:nth-child(n+4) .col-standing {
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 20px;
}

.standing-table .col-points {
  width: 112px;
  white-space: nowrap;
}

.standing-table tbody .col-points {
  font-weight: 700;
  font-size: 20px;
  text-align: center;
}

/* ===== Current Event ===== */
.current-event {
  background: var(--yellow);
  padding: 112px 0;
}

.event-header {
  text-align: center;
  margin-bottom: 80px;
}

.event-block + .event-block {
  margin-top: 80px;
  padding-top: 80px;
  border-top: 1px solid rgba(30, 30, 63, 0.15);
}

.event-tagline {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
  color: var(--dark);
  display: block;
  margin-bottom: 16px;
}

.event-header .section-title {
  margin-bottom: 0;
}

.event-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 80px;
}

.stat-card {
  flex: 1;
  background: var(--dark);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 188px;
}

.stat-value {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.2;
  color: var(--white);
}

.stat-value-small {
  font-size: 40px;
}

.stat-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: var(--white);
}

.event-actions {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Participating Tournaments ===== */
.tournaments {
  background: rgba(37, 85, 127, 0.05);
  padding: 112px 0;
  position: relative;
  overflow: hidden;
}

.tournaments-table {
  width: 100%;
}

.tournaments-table thead th {
  font-size: 14px;
  padding: 12px 12px;
}

.tournaments-table tbody tr:nth-child(odd) td {
  background: var(--yellow);
}

.tournaments-table tbody tr:nth-child(even) td {
  background: var(--white);
}

.tournaments-table tbody td {
  padding: 20px 12px;
  font-family: 'Courier Prime', monospace;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--dark);
  border-bottom: 1px solid var(--dark);
  vertical-align: middle;
  white-space: nowrap;
}

.tournament-name {
  white-space: nowrap;
}

.tournaments-table .col-icon {
  text-align: center;
  padding: 20px 6px;
}

.tournaments-table .col-icon a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tournaments-table .col-icon svg {
  flex-shrink: 0;
}

.tournaments-table .col-icon a:hover {
  opacity: 0.7;
}

/* Tournament cards - hidden on desktop, shown on tablet/mobile */
.tournament-cards {
  display: none;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
}

.tcard-header {
  background: var(--dark);
  color: var(--yellow);
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 24px;
}

.tournament-card {
  border-bottom: 1px solid var(--dark);
}

.tournament-card .tcard-name {
  background: var(--yellow);
}

.tournament-card .tcard-row,
.tournament-card .tcard-links {
  background: var(--white);
}

.tcard-name {
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dark);
  padding: 28px 24px;
  border-bottom: 1px solid var(--dark);
}

.tcard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 24px;
  border-bottom: 1px solid var(--dark);
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dark);
  white-space: nowrap;
}

.tcard-row span {
  font-weight: 400;
}

.tcard-row strong {
  font-weight: 700;
}

.tcard-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--dark);
}

.tcard-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-direction: row-reverse;
}

.tcard-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.tcard-links a:hover {
  opacity: 0.7;
}

.tcard-links svg {
  flex-shrink: 0;
}

.tcard-link-text {
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  padding: 80px 0;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 248px;
}

.footer-logo {
  width: 142px;
  height: 200px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--white);
  margin-bottom: 32px;
}

.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-bottom p {
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
}

.footer-bottom a {
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
}

.footer-bottom a:hover {
  opacity: 0.7;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 40px;
  }

  .tournaments .table-wrapper {
    display: none;
  }

  .tournament-cards {
    display: flex;
  }

  .hero {
    padding: 80px 0;
  }

  .hero-inner {
    gap: 48px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-device {
    width: 360px;
  }

  .prize-cards {
    flex-wrap: wrap;
  }

  .prize-card {
    width: calc(33.33% - 22px);
    min-width: 140px;
  }

  .info-cards {
    flex-wrap: wrap;
  }

  .info-card {
    width: calc(50% - 16px);
    flex: 1;
    min-width: 240px;
  }

  .event-stats {
    flex-wrap: wrap;
  }

  .stat-card {
    min-width: 280px;
  }

  .event-actions {
    flex-wrap: wrap;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .tcard-link-text {
    display: none;
  }

  .tcard-links a {
    text-decoration: none;
    padding: 8px;
  }

  .navbar-inner {
    height: 64px;
  }

  .logo-lpdo {
    font-size: 24px;
    line-height: 24px;
  }

  .logo-rest {
    font-size: 20px;
    line-height: 24px;
  }

  .navbar-right {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--black);
  }

  .navbar-right.open {
    display: flex;
  }

  .navbar-links {
    flex-direction: column;
    gap: 16px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 48px 0;
  }

  .hero-inner {
    flex-direction: column;
    gap: 48px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-device {
    width: 100%;
    max-width: 360px;
  }

  .section-title {
    font-size: 36px;
    margin-bottom: 48px;
  }

  .prizes,
  .standing,
  .current-event,
  .tournaments {
    padding: 64px 0;
  }

  .prize-cards {
    flex-direction: column;
    align-items: center;
  }

  .prize-card {
    width: 100%;
    max-width: 280px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .prize-amount {
    font-size: 36px;
  }

  .info-cards {
    flex-direction: column;
    align-items: center;
  }

  .info-card {
    width: 100%;
  }

  .event-stats {
    flex-direction: column;
  }

  .stat-card {
    min-width: auto;
  }

  .stat-value {
    font-size: 48px;
  }

  .event-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .event-actions .btn {
    justify-content: center;
  }

  .footer-top {
    min-height: auto;
    margin-bottom: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .standing-table .col-standing {
    width: auto;
    font-size: 24px;
  }

  .standing-table tbody .col-standing {
    font-size: 24px;
  }

  .hero-logo-graphic,
  .footer-logo-graphic {
    width: 100px;
    height: 140px;
  }

  .logo-text-overlay {
    font-size: 14.6px;
    line-height: 14.6px;
  }
}
