* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ui-robotic: 'Orbitron', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  font-family: var(--ui-robotic);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: radial-gradient(circle at top, #1a1a1a 0%, #000 100%);
  color: #f5f5f5;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

#arena {
  position: relative;
  z-index: 0;
  display: block;
  touch-action: none;
}

header, #timerBar, .overlay, #auth-section {
  z-index: 10;
  position: relative;
}

.hidden {
  display: none !important;
}


header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #111 0%, #1a1a1a 100%);
  padding: 10px 15px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.15);
  gap: 8px;
}

header div {
  color: #ffcc00;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

header input[type="number"] {
  width: 160px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(20, 20, 20, 0.8);
  color: #fff;
  font-size: 14px;
}

header input[type="number"]:focus {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  outline: none;
}


.header-top,
.header-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}


@media (max-width: 760px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    gap: 6px;
  }

  .header-top,
  .header-bottom {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .header-top::-webkit-scrollbar,
  .header-bottom::-webkit-scrollbar {
    display: none;
  }

  .header-top > *,
  .header-bottom > * {
    flex: 0 0 auto;
  }
}


@media (min-width: 761px) {
  header {
    flex-direction: column; 
    align-items: stretch;   
  }

  .header-top,
  .header-bottom {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap;       
    gap: 10px;
    width: 100%;
  }

  .header-top > *,
  .header-bottom > * {
    flex: 1 1 auto;
    min-width: 80px; 
    text-align: center;
  }
}


.how-to-play-container {
  margin-top: 20px;
  text-align: center;
}

.how-to-play-link {
  display: inline-block;
  font-size: 1.3em;
  font-weight: bold;
  color: #00e6ff;
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 0 5px #00e6ff, 0 0 10px #00ffff, 0 0 20px #00ffff;
  transition: transform 0.2s ease, text-shadow 0.3s ease;
}

.how-to-play-link:hover {
  transform: scale(1.1);
  text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 40px #00ffff;
}

#auth-section, #withdrawOverlay {
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 35px;
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.25);
  width: 90%;
  max-width: 370px;
  margin: 5% auto;
}

/* Center Turnstile properly inside auth modal */
#auth-section .cf-turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 0 auto; /* space from fields, centered */
  width: 100%;
  max-width: 100%;
  transform: none;
}


#auth-section h2,
#withdrawOverlay h2 {
  color: #ffd700;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #ffd700;
}

#auth-section input,
#withdrawOverlay input {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 6px;
  background: rgba(25, 25, 25, 0.85);
  color: #fff;
}

#auth-section input:focus,
#withdrawOverlay input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}


button {
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  color: #111;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  transition: 0.2s ease;
}

button:hover {
  background: linear-gradient(90deg, #ffaa00, #ff5500);
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(255, 165, 0, 0.5);
}

#timerBar {
  width: 100%;
  height: 10px;
  background: #333;
  position: absolute;
  bottom: 0;
  box-shadow: 0 -2px 8px rgba(255, 215, 0, 0.25);
  z-index: 5;
}

#timerFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #ffcc00, #ff5500);
  box-shadow: 0 0 8px #ffcc00;
  transition: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  z-index: 100;
}


