/* css/tonguebound.css */
.tb-root {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0b2316;
  color: #ecfdf5;
  box-sizing: border-box;
}

.tb-root *, .tb-root *::before, .tb-root *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

.tb-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.tb-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.tb-hud-badge {
  background: rgba(6, 44, 27, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ecfdf5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tb-hud-stat {
  color: #4ade80;
  font-weight: 700;
}

.tb-hud-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.tb-btn-icon {
  background: rgba(6, 44, 27, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #ecfdf5;
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.tb-btn-icon:hover {
  background: rgba(16, 77, 48, 0.95);
  border-color: #4ade80;
  transform: scale(1.05);
}

.tb-btn-icon:active {
  transform: scale(0.95);
}

.tb-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(5, 26, 17, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tb-overlay.tb-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tb-card {
  background: #092f1f;
  border: 1.5px solid #22c55e;
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(34, 197, 94, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.tb-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f0fdf4;
  line-height: 1.2;
}

.tb-title span {
  color: #4ade80;
}

.tb-subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: #a7f3d0;
}

.tb-level-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0;
}

.tb-level-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  background: #0f3d2a;
  color: #f0fdf4;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tb-level-btn:hover:not(:disabled) {
  border-color: #4ade80;
  background: #144e36;
  transform: translateY(-1px);
}

.tb-level-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  background: #09261a;
}

.tb-level-name {
  font-weight: 700;
  font-size: 14px;
}

.tb-level-meta {
  font-size: 11px;
  color: #86efac;
  margin-top: 2px;
}

.tb-stars {
  color: #fbbf24;
  letter-spacing: 2px;
  font-size: 13px;
}

.tb-stars-empty {
  color: rgba(255, 255, 255, 0.2);
}

.tb-btn-primary {
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  background: #22c55e;
  color: #052316;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-btn-primary:hover {
  background: #4ade80;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(74, 222, 128, 0.5);
}

.tb-btn-primary:active {
  transform: translateY(1px);
}

.tb-btn-secondary {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: transparent;
  color: #ecfdf5;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tb-btn-secondary:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
}

.tb-dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0;
}

.tb-stat-box {
  background: #0c3322;
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  padding: 8px 4px;
}

.tb-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #86efac;
  letter-spacing: 0.04em;
}

.tb-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.tb-how-to {
  font-size: 12px;
  color: #a7f3d0;
  background: rgba(4, 24, 15, 0.75);
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.4;
}
