.mdn-db {
  --mdn-db-bg: #041316;
  --mdn-db-panel: rgba(6, 28, 32, 0.9);
  --mdn-db-border: #226d78;
  --mdn-db-text: #e8fdff;
  max-width: 920px;
  margin: 16px auto;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--mdn-db-border);
  background: radial-gradient(circle at 50% 14%, #0a2329 0%, #061117 48%, #030b0f 100%);
  color: var(--mdn-db-text);
  box-shadow: 0 0 18px rgba(35, 140, 154, 0.2);
  position: relative;
}

.mdn-db-title {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 2.2rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mdn-db-subtitle {
  margin: 8px 0 12px;
  color: #b8edf2;
}

.mdn-db-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mdn-db-info,
.mdn-db-status {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--mdn-db-border);
  background: var(--mdn-db-panel);
  font-weight: 700;
}

.mdn-db-status {
  margin-bottom: 10px;
}

.mdn-db-status-action {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.mdn-db-mode {
  margin-right: auto;
}

.mdn-db-top-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mdn-db-mute {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #5adcf0;
  background: rgba(0, 11, 14, 0.86);
  color: #e9fcff;
  box-shadow: 0 0 10px rgba(90, 220, 240, 0.25);
  font-weight: 700;
}

.mdn-db-board-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  border: 1px solid #2e7f8a;
  border-radius: 12px;
  background: rgba(4, 16, 20, 0.78);
  padding: 8px;
}

.mdn-db-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  touch-action: none;
}

.mdn-db-fullscreen-btn {
  position: static;
  border: 1px solid #5adcf0;
  background: rgba(0, 11, 14, 0.86);
  color: #e9fcff;
  border-radius: 8px;
  min-width: 44px;
  min-height: 36px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(90, 220, 240, 0.25);
}

.mdn-db-fullscreen-btn.hidden {
  display: none;
}

.mdn-db-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 70;
}

.mdn-db-overlay.hidden {
  display: none;
}

.mdn-db-overlay-card {
  width: min(460px, 100%);
  border-radius: 12px;
  border: 1px solid #2f8f9b;
  background: #041417;
  color: #e9fdff;
  box-shadow: 0 0 16px rgba(91, 220, 240, 0.22);
  padding: 16px;
}

.mdn-db-overlay-card h3 {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mdn-db-overlay-card p {
  margin: 0 0 10px;
  color: #bcebf1;
}

.mdn-db-overlay-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mdn-db-overlay-btn {
  border: 1px solid #2c8f9d;
  background: #072129;
  color: #defbff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.mdn-db-overlay-btn.primary {
  border-color: #79ecff;
  box-shadow: 0 0 8px rgba(121, 236, 255, 0.24);
}

.mdn-db-overlay-btn:hover {
  background: #0a2d37;
}

.mdn-db-fireworks {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

.mdn-db-page-lock {
  overflow: hidden;
}

.mdn-db.mdn-db--mobile-full {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  padding: 10px;
  z-index: 9996;
  overflow: auto;
}

@media (max-width: 700px) {
  .mdn-db {
    margin: 8px auto;
    padding: 10px;
  }

  .mdn-db-top-controls {
    top: 8px;
    right: 8px;
  }

  .mdn-db-mute {
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  .mdn-db.mdn-db--mobile-full .mdn-db-board-wrap {
    min-height: 58dvh;
  }
}
