/* MERGE-BLOCK: base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(0, 229, 255, 0.05) 0%, transparent 40%);
}

body.game-active {
  touch-action: none;
}

.hidden {
  display: none !important;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 18px 20px;
}

.glass-card.menu-card {
  padding: 22px 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-2);
  background: rgba(0, 229, 255, 0.06);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:hover,
.btn.active {
  background: var(--accent-2);
  color: #001018;
  box-shadow: 0 0 18px var(--accent-2-glow);
}

.btn.alt {
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(99, 102, 241, 0.12);
  color: #c4b5fd;
}

.btn.alt:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn.success {
  border-color: rgba(16, 185, 129, 0.65);
  color: #6ee7b7;
}

.btn.success:hover {
  background: var(--success);
  color: #001a12;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

.btn.danger {
  border-color: rgba(239, 68, 68, 0.65);
  color: #fca5a5;
}

.btn.danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
}

.input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input::placeholder {
  color: var(--text-muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle.active {
  border-color: var(--border-active);
  background: var(--accent-glow);
  color: #c7d2fe;
}

#app {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--nav-height) - var(--safe-bottom));
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  transform: translateX(-50%) translateY(12px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
  white-space: nowrap;
}

.toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.game-active .toast {
  top: calc(var(--safe-top) + 10px);
  bottom: auto;
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
}
/* END-MERGE-BLOCK */
