* {
  box-sizing: border-box;
}

body.app-body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #1f325f, #0b1020 45%, #070b16 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.panel {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 1rem;
  padding: 1.2rem;
  backdrop-filter: blur(8px);
}

.weapon-card {
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: 1rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 350px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.weapon-head {
  border-bottom: 1px solid rgba(100, 116, 139, 0.4);
  padding-bottom: 0.45rem;
}

.weapon-label {
  margin: 0;
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weapon-title {
  margin: 0.3rem 0 0;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25rem;
}

.skin-image {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  margin: 0 auto;
}

.skin-select,
.text-input {
  width: 100%;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background-color: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  padding: 0.55rem 0.7rem;
  font-weight: 600;
}

.range-input {
  width: 100%;
  accent-color: #38bdf8;
}

.skin-select:focus,
.text-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.input-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 700;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border: none;
  border-radius: 0.65rem;
  font-weight: 800;
  padding: 0.58rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  background: linear-gradient(120deg, #3b82f6, #2563eb);
  color: white;
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.9);
  color: #e2e8f0;
}

.btn-danger {
  background: linear-gradient(120deg, #ef4444, #dc2626);
  color: white;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-panel {
  width: min(100%, 580px);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #0f172a;
  padding: 1rem;
}

.modal-close {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.3rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 70;
  color: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  max-width: min(90vw, 360px);
  transform: translateY(-10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
}

.toast-enter {
  animation: toast-in 0.24s ease-out forwards;
}

.toast-exit {
  animation: toast-out 0.2s ease-in forwards;
}

.toast-success {
  background: rgba(22, 163, 74, 0.92);
}

.toast-warning {
  background: rgba(217, 119, 6, 0.95);
}

.hidden {
  display: none !important;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.toast-error {
  background: rgba(220, 38, 38, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fee2e2;
}

.error-dump {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.4);
  border-bottom: 4px solid #991b1b;
  max-height: 80vh;
  overflow-y: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  animation: slideDown 0.3s ease-out;
}

.error-dump h2 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  letter-spacing: -0.025em;
}

