:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --red: #e53935;
  --yellow: #ffd60a;
  --orange: #ff8a00;
  --gradient: linear-gradient(135deg, #e53935 0%, #ff8a00 50%, #ffd60a 100%);
  --gradient-soft: linear-gradient(
    135deg,
    rgba(229, 57, 53, 0.15) 0%,
    rgba(255, 138, 0, 0.12) 50%,
    rgba(255, 214, 10, 0.15) 100%
  );
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(255, 214, 10, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ============================================================
   BACKGROUND GLOW EFFECTS (from archery-tools.com)
   ============================================================ */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.bg-glow.red {
  background: #e53935;
  top: -200px;
  left: -200px;
}

.bg-glow.yellow {
  background: #ffd60a;
  bottom: -200px;
  right: -200px;
}

/* ============================================================
   NAVBAR (Glassmorphism & Brand Gradient)
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #000;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.35);
}

.logo-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--text);
}

.nav-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255, 214, 10, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 10, 0.25);
  margin-left: 6px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sprachumschalter DE | EN (identisch zu Archery Counter) */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.2s;
}

.lang-switch a.active {
  background: var(--gradient);
  color: #000;
}

.lang-switch a:hover:not(.active) {
  color: var(--text);
}

@media (max-width: 440px) {
  .nav-badge {
    display: none;
  }
  .nav-right {
    gap: 8px;
  }
  .lang-switch a {
    padding: 5px 9px;
  }
}

/* ============================================================
   CONTAINER & SECTIONS
   ============================================================ */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 18px;
  position: relative;
  z-index: 1;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 500px;
  margin: 0 auto;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   BUTTONS (signature archery-tools.com styles)
   ============================================================ */
.btn-primary {
  background: var(--gradient);
  color: #000;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 10px 35px rgba(229, 57, 53, 0.35);
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 45px rgba(229, 57, 53, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: #262626;
  color: #666;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-secondary,
.btn-reset {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover,
.btn-reset:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 12.5px;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  color: var(--text);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-glass:active {
  transform: scale(0.96);
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 22px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

label.label-yellow {
  color: var(--yellow);
}

input[type="number"],
input[type="text"],
.form-select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}

input[type="number"]:focus,
input[type="text"]:focus,
.form-select:focus {
  border-color: var(--yellow);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.15);
}

.form-select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffd60a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  padding-right: 48px;
}

.form-select option {
  background-color: #141414;
  color: #f5f5f5;
  padding: 10px;
}

/* ============================================================
   RADIO CARDS (with Top Accent Gradient)
   ============================================================ */
.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.25s,
    transform 0.2s,
    background-color 0.25s;
}

.radio-card:hover {
  border-color: rgba(255, 214, 10, 0.3);
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

.radio-card input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--yellow);
  transform: scale(1.2);
}

.radio-card:has(input[type="radio"]:checked) {
  border-color: var(--yellow);
  background: var(--gradient-soft);
}

.radio-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.radio-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.radio-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
}

.badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gradient);
  color: #000;
  padding: 3px 8px;
  border-radius: 100px;
}

.radio-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ============================================================
   CARD ACCENT TOP (from archery-tools.com feature cards)
   ============================================================ */
.card-accent-top {
  position: relative;
  overflow: hidden;
}

.card-accent-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.card-accent-top:hover::before,
.card-accent-top.active::before {
  opacity: 1;
}

/* ============================================================
   SCORING VIEW & ARROWS GRID
   ============================================================ */
.scoring-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.round-badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.round-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--yellow);
}

.round-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.round-total {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 500;
}

.mode-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 100px;
}

.arrows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.arrow-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  user-select: none;
}

.card-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2px;
}

.arrow-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow-card:hover {
  border-color: rgba(255, 214, 10, 0.3);
  transform: translateY(-2px);
}

.arrow-card.active {
  border-color: var(--yellow);
  background: rgba(255, 214, 10, 0.06);
  box-shadow:
    0 0 25px rgba(229, 57, 53, 0.25),
    0 0 10px rgba(255, 214, 10, 0.2);
  transform: translateY(-3px);
}

.arrow-card.active h3 {
  color: var(--yellow);
}

.arrow-card.filled {
  border-color: rgba(255, 255, 255, 0.18);
}

.score-display {
  font-size: 1.8rem;
  font-weight: 800;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

/* ============================================================
   TARGET SCORING UI (Watch bezel dark precision styling)
   ============================================================ */
.target-scoring-container {
  background: var(--bg-soft);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 24px;
}

.target-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-btn-group {
  display: flex;
  gap: 6px;
}

.zoom-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(255, 214, 10, 0.1);
  border: 1px solid rgba(255, 214, 10, 0.25);
  padding: 5px 10px;
  border-radius: 100px;
}

.btn-miss-action {
  margin-left: auto;
  color: #ff8a00;
  border-color: rgba(255, 138, 0, 0.3);
}

.btn-miss-action:hover {
  border-color: #ff8a00;
  background: rgba(255, 138, 0, 0.15);
}

/* Target Viewport mimicking Apple Watch bezel depth from archery-tools.com */
.target-viewport {
  width: 100%;
  height: 380px;
  background: #000;
  border-radius: 28px;
  border: 2px solid #222;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  cursor: crosshair;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.target-canvas-stage {
  position: absolute;
  width: 480px;
  height: 480px;
  transform-origin: center center;
  will-change: transform;
}

#target-svg {
  width: 100%;
  height: 100%;
  pointer-events: all;
  user-select: none;
}

.markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Placed Arrow Markers */
.arrow-marker {
  position: absolute;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border-radius: 50%;
  background: #111;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  pointer-events: auto;
  cursor: grab;
  z-index: 10;
  user-select: none;
  transition:
    transform 0.1s,
    box-shadow 0.15s;
}

.arrow-marker:active {
  cursor: grabbing;
  transform: scale(1.25);
}

.arrow-marker.active-marker {
  background: var(--gradient);
  color: #000;
  border-color: #ffd60a;
  box-shadow:
    0 0 16px rgba(255, 214, 10, 0.8),
    0 0 8px #e53935;
  z-index: 20;
  animation: marker-glow-pulse 1.6s infinite ease-in-out;
}

@keyframes marker-glow-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(255, 214, 10, 0.8);
  }
  50% {
    transform: scale(1.18);
    box-shadow:
      0 0 24px rgba(229, 57, 53, 0.9),
      0 0 10px #ffd60a;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(255, 214, 10, 0.8);
  }
}

.arrow-marker.past-marker {
  opacity: 0.75;
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.7);
  color: #ddd;
}

/* Status Bar & Confirmation */
.target-status-bar {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hit-info-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  text-align: center;
  color: var(--text);
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hit-info-box strong {
  color: var(--yellow);
}

.btn-confirm-arrow {
  width: 100%;
}

.submit-action-row {
  margin-top: 24px;
}

/* ============================================================
   KEYPAD (10 -> 0)
   ============================================================ */
.keypad-container {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keypad-row {
  display: flex;
  gap: 12px;
}

.keypad-row .key-btn {
  flex: 1;
  padding: 16px 12px;
  font-size: 1.6rem;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.keypad-row .key-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-yellow {
  background: #ffd60a;
  color: #000;
  border: 2px solid #e6bf00;
}

.btn-red {
  background: #e53935;
  color: #fff;
  border: 2px solid #c62828;
}

.btn-blue {
  background: #00a2e8;
  color: #fff;
  border: 2px solid #0081b8;
}

.btn-black {
  background: #161616;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-black:hover {
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-white {
  background: #f5f5f5;
  color: #000;
  border: 2px solid #cccccc;
}

.btn-miss {
  background: #555555;
  color: #fff;
  border: 2px solid #444444;
}

/* ============================================================
   REPORT VIEW & TABLES
   ============================================================ */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 30px;
  border-radius: 18px;
  border: 1px solid var(--border-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-soft);
  overflow: hidden;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--yellow);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.arrow-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}

.score-total-val {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.score-avg-val {
  font-weight: 700;
  color: var(--yellow);
}

.dispersion-value {
  font-weight: 800;
  font-size: 15px;
  color: var(--yellow);
}

.dispersion-cm {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}

.scores-list {
  font-size: 13px;
  color: var(--text-dim);
}

.text-dim {
  color: var(--text-dim);
}

/* ============================================================
   DISPERSION CARDS GRID
   ============================================================ */
.dispersion-section-header {
  margin-top: 36px;
  margin-bottom: 20px;
  text-align: left;
}

.dispersion-section-header h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dispersion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dispersion-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    transform 0.25s,
    border-color 0.25s;
}

.dispersion-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 214, 10, 0.3);
}

.dispersion-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.dispersion-card-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.dispersion-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255, 214, 10, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 10, 0.25);
}

.dispersion-chart-container {
  width: 100%;
  max-width: 210px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.mini-target-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.dispersion-card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.dispersion-card-footer strong {
  color: var(--text);
}

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 600px) {
  body {
    padding-bottom: 40px;
  }

  nav {
    padding: 12px 16px;
  }

  .container {
    padding: 14px 12px;
  }

  .section-card {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .arrows-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .arrow-card {
    padding: 10px 6px;
  }

  .target-viewport {
    height: 330px;
    border-radius: 22px;
  }

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