.dbfg-game {
  --dbfg-mint: #19a388;
  --dbfg-violet: #493699;
  --dbfg-indigo: #251b5b;
  --dbfg-night: #0e0f19;
  --dbfg-ice: #e7f8f4;
  --dbfg-lavender: #efeaff;
  max-width: 680px;
  margin: 0 auto;
  font-family: "Suprif", "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--dbfg-night);
}

.dbfg-card {
  background: linear-gradient(160deg, var(--dbfg-lavender), var(--dbfg-ice));
  border: 2px solid #ffffffc7;
  border-radius: 18px;
  box-shadow: 0 14px 30px #0e0f1930;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.dbfg-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, #ffffff70 0, #ffffff00 72%);
  pointer-events: none;
}

.dbfg-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.dbfg-subtitle {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #2e216e;
}

.dbfg-hud {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.dbfg-chip {
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffffffc9;
  border: 1px solid #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.dbfg-chip-label {
  color: #352b70;
}

.dbfg-chip strong {
  font-size: 1.1rem;
}

.dbfg-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.dbfg-btn:hover,
.dbfg-btn:focus {
  transform: translateY(-1px);
  filter: saturate(1.1);
}

.dbfg-start-btn,
.dbfg-replay-btn,
.dbfg-submit-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--dbfg-violet), var(--dbfg-mint));
}

.dbfg-mode-select {
  margin: 8px 0 16px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffffc7, #efeaff99);
  border: 1px solid #ffffff;
}

.dbfg-mode-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: #2b2361;
}

.dbfg-mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dbfg-mode-btn {
  border: 1px solid #cfc9f6;
  background: #ffffffd9;
  color: #2b2361;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dbfg-mode-btn:hover,
.dbfg-mode-btn:focus {
  transform: translateY(-1px);
  border-color: #8f82db;
}

.dbfg-mode-btn.is-active {
  background: linear-gradient(135deg, #493699, #19a388);
  color: #fff;
  border-color: transparent;
}

.dbfg-mode-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #3a2b83;
}

.dbfg-stage-wrap {
  padding: 10px;
  background: linear-gradient(145deg, #2c205f, #0e0f19);
  border: 2px solid #ffffff3b;
}

.dbfg-canvas {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 3px solid #fff4;
  box-shadow: inset 0 0 0 1px #0000002a, 0 16px 40px #07080f66;
  touch-action: manipulation;
}

.dbfg-end-title {
  margin-top: 0;
}

.dbfg-final-score-wrap {
  margin: 8px 0;
}

.dbfg-final-score {
  font-size: 1.3rem;
}

.dbfg-entry-form {
  margin: 14px 0;
  display: grid;
  gap: 10px;
}

.dbfg-field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #2c225e;
}

.dbfg-field input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #c8c0eb;
  padding: 10px;
  background: #ffffff;
}

.dbfg-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  font-size: 0.85rem;
  color: #2c225e;
}

.dbfg-form-status {
  min-height: 1.1em;
  font-size: 0.85rem;
  color: #251b5b;
  margin: 0;
}

.dbfg-leaderboard h3 {
  margin: 0 0 10px;
}

.dbfg-leaderboard-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
}

@media (min-width: 720px) {
  .dbfg-card {
    padding: 20px;
  }

  .dbfg-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dbfg-mode-btn {
    text-align: center;
  }

  .dbfg-btn {
    width: auto;
    min-width: 180px;
  }

  .dbfg-intro .dbfg-btn {
    display: inline-block;
  }
}
