/* ============================================================
   SLRP.LOL — Commercial SaaS Design System (Dark Default + Light Mode)
   ============================================================ */

:root,
html.dark {
  --bg: #090b10;
  --surface: #11151d;
  --surface-2: #191f2b;
  --accent: #ff4057;
  --accent-hover: #ff566b;
  --accent-2: #8b5cf6;
  --accent-2-hover: #9b72f8;
  --text: #f5f5f7;
  --muted: #929aaa;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --glass: rgba(17, 21, 29, 0.76);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html.light {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eceff6;
  --accent: #ff4057;
  --accent-hover: #e6344a;
  --accent-2: #7c3aed;
  --accent-2-hover: #6d28d9;
  --text: #0f131c;
  --muted: #5a6478;
  --border: rgba(15, 19, 28, 0.09);
  --border-strong: rgba(15, 19, 28, 0.16);
  --glass: rgba(255, 255, 255, 0.82);
  --shadow: 0 12px 32px rgba(15, 19, 28, 0.08);
  color-scheme: light;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Layout Containers */
.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1; }

/* Public Navbar */
.slrp-navbar {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
}
.navbar-inner {
  max-width: 1220px; margin: 0 auto; padding: 0 20px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 0 22px rgba(255, 64, 87, 0.28);
}
.brand span b { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px;
  border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: 0.15s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn { display: none; }

/* Cards & Glass */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.card-glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card-hover { transition: border-color 0.16s, transform 0.16s; }
.card-hover:hover { border-color: rgba(255, 64, 87, 0.42); transform: translateY(-2px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 22px rgba(255, 64, 87, 0.24); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-purple { background: var(--accent-2); color: #fff; box-shadow: 0 0 22px rgba(139, 92, 246, 0.24); }
.btn-purple:hover { background: var(--accent-2-hover); }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 8px 26px rgba(88, 101, 242, 0.3); }
.btn-discord:hover { background: #6975f5; transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-danger { background: rgba(239, 68, 68, 0.14); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.24); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--muted);
}
.badge-accent { background: rgba(255,64,87,0.14); border-color: rgba(255,64,87,0.32); color: #ff7586; }
.badge-purple { background: rgba(139,92,246,0.16); border-color: rgba(139,92,246,0.35); color: #c4b5fd; }
.badge-success { background: rgba(16,185,129,0.14); border-color: rgba(16,185,129,0.32); color: #6ee7b7; }
.badge-warning { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.32); color: #fcd34d; }
.badge-danger { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.32); color: #fca5a5; }

/* Form Inputs */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border-radius: 10px; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 75%, var(--surface));
  color: var(--text); padding: 9px 12px; font-size: 13.5px; transition: border-color 0.15s;
}
.input, .select { height: 40px; }
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 64, 87, 0.16); }
.slider { width: 100%; accent-color: var(--accent); cursor: pointer; }

/* Switch */
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; cursor: pointer; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255,255,255,0.16); transition: 0.18s;
}
.switch-track::after {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; transition: 0.18s;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.text-muted { color: var(--muted); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13.5px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }

/* Dashboard & Admin Shell */
.slrp-dashboard-shell, .slrp-admin {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 256px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-head {
  height: 64px; padding: 0 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.sidebar-group { margin-bottom: 18px; }
.sidebar-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); opacity: 0.72; padding: 0 10px 6px;
}
.sidebar-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 500;
  color: var(--muted); margin-bottom: 2px; transition: 0.14s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-item.active {
  background: rgba(255, 64, 87, 0.14); color: var(--text);
  border: 1px solid rgba(255, 64, 87, 0.3);
}
.slrp-admin .sidebar-item.active {
  background: rgba(139, 92, 246, 0.18); border-color: rgba(139, 92, 246, 0.38);
}
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar {
  height: 64px; position: sticky; top: 0; z-index: 30; padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dash-content { padding: 28px; flex: 1; max-width: 1260px; width: 100%; margin: 0 auto; }

/* Hero & Homepage */
.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  padding: 78px 0 64px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 64, 87, 0.16), transparent 42%),
    radial-gradient(circle at 80% 25%, rgba(139, 92, 246, 0.15), transparent 44%);
}
.hero-title {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 16px 0;
}
.gradient-text {
  background: linear-gradient(90deg, #ff4057, #ff6d80, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.claim-bar {
  max-width: 440px; margin: 32px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 16px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--border-strong);
}

/* Visual Editor Split Workspace */
.editor-grid { display: grid; grid-template-columns: 355px 1fr; gap: 18px; align-items: start; }
.editor-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.editor-tab {
  padding: 10px 4px; font-size: 10.5px; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.editor-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(255,64,87,0.1); }
.editor-stage {
  border: 1px solid var(--border); border-radius: 16px; background: rgba(0,0,0,0.35);
  padding: 18px; overflow: hidden;
}
.preview-frame { margin: 0 auto; transition: max-width 0.2s ease; }

/* Profile Animated Canvases & Effects */
.slrp-bg-aurora-wave {
  background: linear-gradient(125deg, #07151a 0%, #140e26 28%, #0b1f2c 55%, #200a19 80%, #090b10 100%);
  background-size: 300% 300%;
  animation: slrpGrad 16s ease infinite;
}
.slrp-bg-cyber-grid {
  background-color: #06070d;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 72, 153, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.22), transparent 60%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
}
.slrp-bg-obsidian-mesh {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 64, 87, 0.24), transparent 42%),
    radial-gradient(circle at 82% 76%, rgba(139, 92, 246, 0.22), transparent 46%),
    #090b10;
  background-size: 140% 140%;
  animation: slrpGrad 20s ease infinite;
}
.slrp-scanlines {
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px);
}
.slrp-rgb-ring { position: relative; }
.slrp-rgb-ring::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(90deg, #ff4057, #8b5cf6, #06b6d4, #34d399, #ff4057);
  background-size: 300% 300%; animation: slrpGrad 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.slrp-animated-text { background-size: 200% auto; animation: slrpShimmer 5s linear infinite; }

@keyframes slrpGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes slrpShimmer { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* Modal & Toast */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 24px; box-shadow: 0 24px 64px rgba(0,0,0,0.65);
}
.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.toast {
  padding: 12px 15px; border-radius: 12px; font-size: 13px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 10px;
}
.toast-success { border-color: rgba(16, 185, 129, 0.45); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); }

/* Empty state & Skeleton */
.empty-state {
  border: 1px dashed var(--border-strong); border-radius: 14px;
  padding: 44px 20px; text-align: center; background: rgba(255,255,255,0.015);
}
.skeleton {
  border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%; animation: slrpGrad 1.6s infinite;
}
.alert {
  padding: 12px 14px; border-radius: 12px; font-size: 12.5px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border);
}
.alert-danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); color: #fecaca; }
.alert-warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); color: #fde68a; }
.alert-info { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.35); color: #ddd6fe; }

/* Progress Bar */
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Drag handle */
.drag-row { cursor: grab; }
.drag-row.dragging { opacity: 0.45; }

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

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-grid { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; z-index: 55; transition: left 0.2s; }
  .sidebar.open { left: 0; }
  .mobile-menu-btn { display: inline-flex !important; }
}
@media (max-width: 720px) {
  .nav-links, .nav-actions-desktop { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dash-content { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .slrp-bg-aurora-wave, .slrp-bg-obsidian-mesh, .slrp-rgb-ring::before, .slrp-animated-text, .skeleton {
    animation: none !important;
  }
}
