:root {
  --primary: #e60012;
  --primary-hover: #ff1e30;
  --secondary: #ff3344;
  --primary-soft: rgba(230, 0, 18, 0.14);
  --primary-border: rgba(230, 0, 18, 0.35);

  --bg-950: #050507;
  --bg-900: #0a0a0d;
  --bg-850: #101015;
  --bg-800: #16161d;

  --surface: rgba(16, 16, 21, 0.92);
  --surface-strong: #111117;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-soft: #d4d4d8;
  --muted: #a1a1aa;

  --emerald: #22c55e;
  --amber: #f59e0b;
  --sky: #38bdf8;
  --rose: #f493a7;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --topbar-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-950);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--primary);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.86em;
  color: #fda4af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #070709;
}
::-webkit-scrollbar-thumb {
  background: #27181b;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography helpers */
.font-impact {
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.02em;
}

.font-display {
  font-family: 'Montserrat', sans-serif;
}

.font-brush {
  font-family: 'Permanent Marker', cursive;
}

.text-crimson {
  color: var(--primary);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.app-main {
  padding-top: var(--topbar-h);
  min-height: calc(100vh - 110px);
}

.view-panel {
  display: none;
  animation: fadeSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.is-active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: floatSlow 4.5s ease-in-out infinite;
}

/* Sandbox Banner */
.sandbox-banner {
  position: relative;
  z-index: 60;
  background: rgba(245, 158, 11, 0.16);
  border-bottom: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.74rem;
  border-radius: 10px;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 0.88rem;
  border-radius: 14px;
}

.btn-crimson-glow {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 26px rgba(230, 0, 18, 0.42);
}

.btn-crimson-glow:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 38px rgba(230, 0, 18, 0.72);
}

.btn-store-buy {
  background: #ffffff;
  color: #050507;
  font-weight: 900;
}

.btn-store-buy:hover:not(:disabled) {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(230, 0, 18, 0.65);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-crimson-outline {
  background: rgba(24, 10, 13, 0.85);
  border-color: rgba(230, 0, 18, 0.55);
  color: #ff4d5b;
}

.btn-crimson-outline:hover:not(:disabled) {
  background: rgba(230, 0, 18, 0.18);
  color: #fff;
}

.btn-danger-ghost {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.24);
}

/* Badges & Pills */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: #ff4d5b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.85);
}

.pulse-dot.crimson {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(230, 0, 18, 0.85);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: #120b0d;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary);
  color: #fff;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  animation: fadeSlideIn 0.2s ease;
}

.toast.is-success {
  border-left-color: var(--emerald);
}

.toast.is-error {
  border-left-color: #ef4444;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #040406;
  padding: 36px 0;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links button,
.footer-links a {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-links button:hover,
.footer-links a:hover {
  color: #fff;
}
