@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

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

body {
  font-family: 'Share Tech Mono', monospace;
  background: #0a0a0a;
  color: #00ff41;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1000;
}

.glitch {
  position: relative;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  91% { transform: translate(-2px, 2px); }
  92% { transform: translate(2px, -2px); }
  93% { transform: translate(-2px, 2px); }
}

header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Tile the transparent hex pattern over a solid background color */
  background-color: #1a0033;
  background-image: url('../img/hex30.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #ff0055;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-shadow:
    0 0 10px #ff0055,
    0 0 20px #ff0055,
    0 0 30px #ff0055,
    3px 3px 0 #8a2be2;
  margin-bottom: 1rem;
  z-index: 1;
}

.tagline {
  font-size: 1.5rem;
  color: #ffff00;
  text-shadow: 0 0 10px #ffff00;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  z-index: 1;
}

.cta-button {
  padding: 1.5rem 3rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ff0055, #8a2be2);
  color: #fff;
  border: 2px solid #00ff41;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  z-index: 1;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ff41, 0 0 40px #ff0055;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(0, 255, 65, 0.2);
  transition: left 0.3s;
}

.cta-button:hover::before {
  left: 100%;
}

section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  color: #ff0055;
  text-shadow: 0 0 10px #ff0055;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-left: 5px solid #8a2be2;
  padding-left: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.info-card {
  background: rgba(138, 43, 226, 0.1);
  border: 2px solid #8a2be2;
  padding: 2rem;
  position: relative;
  transition: all 0.3s;
}

.info-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  border-top: 2px solid #00ff41;
  border-left: 2px solid #00ff41;
}

.info-card::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid #00ff41;
  border-right: 2px solid #00ff41;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 85, 0.3);
  border-color: #ff0055;
}

.info-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  color: #ffff00;
  text-shadow: 0 0 5px #ffff00;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.info-card p {
  line-height: 1.8;
  color: #00ff41;
}

.censored {
  display: inline-block;
  padding: 0.15em 0.15em;
  color: transparent;
  text-shadow: none;
  white-space: nowrap;
  user-select: none;
  background-image:
    repeating-conic-gradient(#000000 0 25%, transparent 0 50%),
    repeating-conic-gradient(#00ff41 0 25%, transparent 0 50%),
    repeating-conic-gradient(#00aa00 0 25%, transparent 0 50%);
  background-position: 0 center, 5px center, 2px center;
  background-repeat: repeat-x;
  background-size: 12px 8px, 18px 8px, 7px 8px;
}

.info-card .disclaimer {
  margin-top: 1rem;
  color: #ffff00;
  font-size: 0.85rem;
  line-height: 1.5;
}

.features {
  background: linear-gradient(180deg, #0a0a0a 0%, #1a0033 50%, #0a0a0a 100%);
}

.feature-list {
  list-style: none;
  margin-top: 2rem;
}

.feature-list li {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: rgba(255, 0, 85, 0.1);
  border-left: 4px solid #ff0055;
  position: relative;
  padding-left: 3rem;
}

.feature-list li::before {
  content: '▶';
  position: absolute;
  left: 1rem;
  color: #8a2be2;
  font-size: 1.2rem;
}

footer {
  background: #0a0a0a;
  border-top: 3px solid #ff0055;
  padding: 2rem;
  text-align: center;
  color: #8a2be2;
}

.warning {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 0, 0.1);
  border: 1px solid #ffff00;
  color: #ffff00;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .tagline { font-size: 1rem; }
}

.leaderboard-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(10, 10, 10, 0.94), rgba(10, 10, 10, 0.98)),
    url('../img/hex30.png') repeat;
}

.leaderboard-header {
  min-height: 0;
  height: auto;
  padding: 1.5rem 2rem 3rem;
  background-color: #1a0033;
  border-bottom: 3px solid #ff0055;
  text-align: center;
}

.leaderboard-back {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  z-index: 1;
  color: #00ff41;
  font-size: 0.9rem;
  text-decoration: none;
}

.leaderboard-back:hover {
  color: #ffff00;
  text-shadow: 0 0 8px #ffff00;
}

.leaderboard-kicker {
  margin: 2rem 0 0.75rem;
  color: #00ff41;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

.leaderboard-header h1 {
  margin-bottom: 0.75rem;
  color: #fff200;
  font-size: clamp(2rem, 7vw, 4rem);
}

.leaderboard-subtitle {
  color: #ffff00;
  letter-spacing: 0.18em;
}

.leaderboard-section {
  padding: 3rem 0 4rem;
}

.leaderboard-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.leaderboard-section-heading h2 {
  margin: 0;
  font-size: 1.7rem;
}

.leaderboard-section-heading p {
  color: #ffff00;
  font-size: 0.85rem;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border: 1px solid #8a2be2;
  background: rgba(10, 10, 10, 0.82);
}

.leaderboard-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(138, 43, 226, 0.45);
}

.leaderboard-table th {
  color: #ffff00;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table tbody tr:hover {
  background: rgba(255, 0, 85, 0.1);
}

.leaderboard-rank {
  width: 12%;
  color: #ff0055;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}

.leaderboard-player {
  color: #00ff41;
  font-weight: 700;
}

.leaderboard-downs {
  color: #ffff00;
  font-variant-numeric: tabular-nums;
}

.leaderboard-footer {
  border-top: 1px solid #ff0055;
  padding: 1.5rem;
  color: #8a2be2;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 600px) {
  .leaderboard-header {
    padding: 1.25rem 1rem 2.5rem;
  }

  .leaderboard-back {
    top: 1rem;
    left: 1rem;
    font-size: 0.75rem;
  }

  .leaderboard-kicker {
    margin-top: 2.5rem;
  }

  .leaderboard-section {
    padding: 2rem 0;
  }

  .leaderboard-section-heading h2 {
    font-size: 1.35rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.85rem;
  }
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.admin-section,
.admin-login-section {
  padding: 2.5rem 0 4rem;
}

.admin-login-section {
  max-width: 680px;
  margin: 0 auto;
}

.admin-login-section h2,
.admin-panel h2,
.admin-records-heading {
  font-size: 1.5rem;
}

.admin-form {
  display: grid;
  gap: 0.8rem;
}

.admin-login-form {
  max-width: 520px;
  margin-top: 1.5rem;
}

.admin-form label {
  color: #ffff00;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
}

.admin-form input {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #8a2be2;
  border-radius: 0;
  background: #101010;
  color: #00ff41;
  font: inherit;
}

.admin-form input:focus {
  outline: 2px solid #ffff00;
  outline-offset: 2px;
}

.admin-button {
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid #00ff41;
  border-radius: 0;
  background: #ff0055;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.admin-button:hover,
.admin-button:focus-visible {
  background: #8a2be2;
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.45);
}

.admin-toolbar,
.admin-form-actions,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-toolbar {
  justify-content: space-between;
  margin-bottom: 1.5rem;
  color: #ffff00;
}

.admin-toolbar form,
.admin-row-actions form {
  margin: 0;
}

.admin-button-secondary {
  background: transparent;
  color: #00ff41;
}

.admin-panel {
  margin: 0 0 3rem;
  padding: 1.5rem;
  border: 1px solid #8a2be2;
  background: rgba(10, 10, 10, 0.82);
}

.admin-record-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.admin-form-actions {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.admin-cancel,
.admin-action {
  color: #00ff41;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  text-decoration: none;
}

.admin-cancel:hover,
.admin-action:hover {
  color: #ffff00;
  text-decoration: underline;
}

.admin-row-actions {
  gap: 0.8rem;
  white-space: nowrap;
}

.admin-action-danger {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: #ff0055;
}

.admin-records-heading {
  margin-bottom: 1.5rem;
}

.admin-table {
  min-width: 760px;
}

.admin-message {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid;
  background: rgba(10, 10, 10, 0.8);
}

.admin-message-error {
  border-color: #ff0055;
  color: #ff7a9f;
}

.admin-message-success {
  border-color: #00ff41;
  color: #00ff41;
}

@media (max-width: 600px) {
  .admin-main {
    padding: 0 1rem;
  }

  .admin-section,
  .admin-login-section {
    padding: 2rem 0;
  }

  .admin-record-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-panel {
    padding: 1rem;
  }

  .admin-toolbar {
    align-items: flex-start;
  }
}
