/* ═══════════════════════════════════════════
   UCR RoleMaker — Glass Morphism Design
   Primary: #1338BE (Cobalt Blue) + Grey
   ═══════════════════════════════════════════ */

/* ── Variables ───────────────────────────── */
:root {
  --primary:        #1338BE;
  --primary-light:  #1e4de0;
  --primary-dark:   #0d2794;
  --primary-glow:   rgba(19,56,190,0.40);
  --primary-subtle: rgba(19,56,190,0.12);

  --bg:     #060c1e;
  --bg-2:   #090f26;

  --glass:        rgba(255,255,255,0.04);
  --glass-hover:  rgba(255,255,255,0.07);
  --glass-active: rgba(19,56,190,0.12);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-hover: rgba(255,255,255,0.16);

  --text:         #f0f4ff;
  --text-sec:     rgba(240,244,255,0.65);
  --text-muted:   rgba(240,244,255,0.35);

  --success: #00e5a0;
  --warning: #ffb020;
  --error:   #ff4757;
  --info:    #54a0ff;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  --shadow-sm:  0 2px 12px rgba(0,0,0,0.25);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.35);
  --shadow-lg:  0 16px 56px rgba(0,0,0,0.45);
  --shadow-glow:0 0 40px var(--primary-glow);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);

  --nav-height: 64px;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img, svg { display: block; }
ul, ol { list-style: none; }

/* ── Animated Background ─────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}
.orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(19,56,190,0.35) 0%, transparent 70%);
  top: -250px; left: -250px;
  animation: driftA 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(19,56,190,0.20) 0%, transparent 70%);
  bottom: -200px; right: -150px;
  animation: driftB 28s ease-in-out infinite alternate;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(30,77,224,0.18) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: driftC 35s ease-in-out infinite alternate;
}
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(19,56,190,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,56,190,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes driftA { to { transform: translate(80px, 60px); } }
@keyframes driftB { to { transform: translate(-60px, -80px); } }
@keyframes driftC { to { transform: translate(-50% - 40px, -50% + 40px) scale(1.15); } }

/* ── Navbar ──────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(6,12,30,0.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
}
.navbar.scrolled {
  background: rgba(6,12,30,0.92);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--primary-glow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.nav-logo:hover .logo-mark {
  box-shadow: 0 0 28px var(--primary-glow);
  transform: scale(1.06);
}
.logo-text { display: flex; align-items: baseline; gap: 4px; }
.logo-main { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.3px; color: var(--text); }
.logo-sep  { color: var(--primary); font-weight: 700; }
.logo-sub  { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.nav-divider {
  width: 1px; height: 20px;
  background: var(--glass-border);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sec);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--glass-hover); }
.nav-link.active { color: var(--text); background: var(--glass-active); }
.nav-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-link svg { flex-shrink: 0; opacity: 0.7; }
.nav-plugin-link { gap: 6px; }

.badge-soon {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,176,32,0.15);
  color: var(--warning);
  border: 1px solid rgba(255,176,32,0.3);
  border-radius: var(--radius-full);
  padding: 1px 6px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  transition: background var(--transition);
}
.hamburger:hover { background: var(--glass-hover); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-sec);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Plugin Pills ────────────────────────── */
.plugin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.plugin-pill.pill-lg { font-size: 12px; padding: 3px 8px; }
.pill-ucr  { background: rgba(19,56,190,0.25); color: #6ea3ff; border: 1px solid rgba(19,56,190,0.4); }
.pill-uct  { background: rgba(0,229,160,0.15); color: #00e5a0; border: 1px solid rgba(0,229,160,0.3); }
.pill-uci  { background: rgba(255,176,32,0.15); color: #ffb020; border: 1px solid rgba(255,176,32,0.3); }
.pill-ucez { background: rgba(255,71,87,0.15); color: #ff6b78; border: 1px solid rgba(255,71,87,0.3); }

/* ── Glass Card ──────────────────────────── */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

/* ── Pages & Layout ──────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-height));
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 80px;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.page.hidden { display: none; }

/* ── Animations ──────────────────────────── */
[data-anim] { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-anim].visible { opacity: 1; transform: none; }
[data-anim]:nth-child(2) { transition-delay: 0.1s; }
[data-anim]:nth-child(3) { transition-delay: 0.2s; }

@keyframes fadeUp   { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes scaleIn  { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
@keyframes slideDown{ from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:none; } }
@keyframes float    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* ── Hero Section ────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 520px;
  padding: 40px 0 80px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 10px var(--primary)} 50%{box-shadow:0 0 20px var(--primary), 0 0 6px var(--primary)} }

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.text-gradient {
  background: linear-gradient(135deg, #4d82ff 0%, #1338BE 50%, #6ea3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 17px;
  color: var(--text-sec);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card-float {
  width: 100%;
  max-width: 380px;
  padding: 20px;
  animation: float 5s ease-in-out infinite;
  border: 1px solid rgba(19,56,190,0.3);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}
.hcf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.hero-yaml {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: none;
  border: none;
  padding: 0;
  overflow: auto;
}
.hero-yaml code { background: none; }
.yc-key  { color: #6ea3ff; }
.yc-str  { color: #00e5b0; }
.yc-num  { color: #ff9f43; }
.yc-bool { color: #c678dd; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(19,56,190,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), #2a5cf0);
  box-shadow: 0 6px 28px rgba(19,56,190,0.55);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--glass);
  color: var(--text-sec);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
  color: var(--text);
}
.btn-ghost.btn-danger:hover {
  border-color: rgba(255,71,87,0.4);
  color: var(--error);
  background: rgba(255,71,87,0.08);
}

.btn-secondary {
  background: rgba(19,56,190,0.18);
  color: #7db2ff;
  border-color: rgba(19,56,190,0.35);
}
.btn-secondary:hover {
  background: rgba(19,56,190,0.28);
  border-color: rgba(19,56,190,0.55);
  color: #a0c8ff;
}

.btn-sm  { padding: 7px 14px; font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--glass-hover); color: var(--text); border-color: var(--glass-border-hover); }

/* ── Section Shared ──────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
  color: var(--text);
}

/* ── Stats Section ───────────────────────── */
.stats-section { padding: 60px 0; text-align: center; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.stat-card {
  padding: 32px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.stat-card.featured {
  background: rgba(19,56,190,0.12);
  border-color: rgba(19,56,190,0.3);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}
.stat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.stat-icon-wrap.import { background: rgba(0,229,160,0.1); color: var(--success); border: 1px solid rgba(0,229,160,0.2); }
.stat-icon-wrap.export { background: rgba(19,56,190,0.15); color: #6ea3ff; border: 1px solid rgba(19,56,190,0.3); }
.stat-icon-wrap.total  { background: rgba(255,176,32,0.1); color: var(--warning); border: 1px solid rgba(255,176,32,0.2); }
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1;
}
.stat-label { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }

/* ── Features Section ────────────────────── */
.features-section { padding: 40px 0 60px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(19,56,190,0.3);
  box-shadow: var(--shadow-md), 0 0 20px rgba(19,56,190,0.1);
}
.feat-icon {
  width: 44px; height: 44px;
  background: var(--primary-subtle);
  border: 1px solid rgba(19,56,190,0.25);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #6ea3ff;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.feature-card p  { font-size: 13.5px; color: var(--text-sec); line-height: 1.6; }

/* ── Plugins Section ─────────────────────── */
.plugins-section { padding: 40px 0 60px; }
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.plugin-card {
  padding: 24px;
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition);
}
.plugin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.plugin-card.active-plugin { cursor: pointer; }
.plugin-card.active-plugin:hover {
  border-color: rgba(19,56,190,0.4);
  box-shadow: var(--shadow-md), 0 0 24px rgba(19,56,190,0.15);
}
.plugin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.plugin-card h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.plugin-card p  { font-size: 13px; color: var(--text-sec); margin-bottom: 18px; line-height: 1.6; }
.plugin-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.plugin-status.available  { background: rgba(0,229,160,0.12); color: var(--success); border: 1px solid rgba(0,229,160,0.25); }
.plugin-status.coming-soon{ background: rgba(255,176,32,0.1); color: var(--warning); border: 1px solid rgba(255,176,32,0.2); }

/* ══════════════════════════════════════
   UCR CREATOR
   ══════════════════════════════════════ */
.creator-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.creator-title-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.creator-title-group .plugin-pill { margin-top: 6px; flex-shrink: 0; }
.creator-title { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.creator-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }
.creator-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; }

.creator-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

/* ── Accordion ───────────────────────────── */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.acc-section {
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.acc-section.open {
  border-color: rgba(19,56,190,0.28);
  box-shadow: 0 0 0 1px rgba(19,56,190,0.1);
}
.acc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.acc-header:hover { background: rgba(255,255,255,0.03); }
.acc-header-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--primary-subtle);
  border: 1px solid rgba(19,56,190,0.22);
  display: flex; align-items: center; justify-content: center;
  color: #6ea3ff;
  flex-shrink: 0;
}
.acc-header-info { flex: 1; min-width: 0; }
.acc-header-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.acc-header-desc  { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.acc-chevron {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.acc-section.open .acc-chevron { transform: rotate(180deg); }

.acc-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4,0,0.2,1);
}
.acc-section.open .acc-body-wrap { grid-template-rows: 1fr; }
.acc-body { overflow: hidden; }
.acc-body-inner {
  padding: 0 20px 20px;
  border-top: 1px solid var(--glass-border);
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 18px;
}
.field-full { grid-column: 1 / -1; }

/* ── Form Fields ─────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
}
.field-required {
  color: var(--error);
  font-size: 11px;
  line-height: 1;
}
.info-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.info-btn:hover { background: var(--primary-subtle); color: #6ea3ff; border-color: rgba(19,56,190,0.4); }

.field-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field-input:focus {
  border-color: rgba(19,56,190,0.6);
  box-shadow: 0 0 0 3px rgba(19,56,190,0.15);
  background: rgba(0,0,0,0.35);
}
.field-input.error {
  border-color: rgba(255,71,87,0.5);
  box-shadow: 0 0 0 3px rgba(255,71,87,0.1);
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:disabled { opacity: 0.4; cursor: not-allowed; }

select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(240,244,255,0.4)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
select.field-input option {
  background: #0d1830;
  color: var(--text);
}

.field-error {
  font-size: 11.5px;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 16px;
}
.field-hint  { font-size: 11.5px; color: var(--text-muted); }

/* ── Toggle Switch ───────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.toggle-wrap:hover {
  background: rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.14);
}
.toggle-track {
  width: 40px; height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  position: relative;
  flex-shrink: 0;
  transition: background 0.25s;
}
.toggle-thumb {
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.toggle-wrap.on .toggle-track { background: var(--primary); box-shadow: 0 0 10px rgba(19,56,190,0.4); }
.toggle-wrap.on .toggle-thumb { left: 21px; }
.toggle-label-text { font-size: 13.5px; color: var(--text-sec); }
.toggle-wrap.on .toggle-label-text { color: var(--text); }

/* ── Tag Input ───────────────────────────── */
.tag-input-wrap {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  min-height: 42px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tag-input-wrap:focus-within {
  border-color: rgba(19,56,190,0.6);
  box-shadow: 0 0 0 3px rgba(19,56,190,0.15);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-subtle);
  border: 1px solid rgba(19,56,190,0.3);
  border-radius: var(--radius-full);
  padding: 2px 10px 2px 10px;
  font-size: 12px;
  color: #7db2ff;
  white-space: nowrap;
  animation: scaleIn 0.15s ease;
}
.tag-remove {
  display: flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(125,178,255,0.6);
  transition: color var(--transition), background var(--transition);
}
.tag-remove:hover { color: var(--error); background: rgba(255,71,87,0.15); }
.tag-text-input {
  flex: 1;
  min-width: 120px;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  padding: 2px 4px;
}
.tag-text-input::placeholder { color: var(--text-muted); }

/* ── Textarea ────────────────────────────── */
textarea.field-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* ── Tag Select ──────────────────────────── */
.tag-select-wrap {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tag-select-wrap:focus-within {
  border-color: rgba(19,56,190,0.6);
  box-shadow: 0 0 0 3px rgba(19,56,190,0.15);
}
.tag-select-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 20px;
}
.tag-select-wrap .tag-select-dropdown {
  width: 100%;
  background-color: rgba(0,0,0,0.2);
}

/* ── Dropdown Autocomplete ───────────────── */
.field-select-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 50;
  background: #0d1830;
  border: 1px solid rgba(19,56,190,0.3);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.15s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(19,56,190,0.4) transparent;
}
.autocomplete-list::-webkit-scrollbar { width: 5px; }
.autocomplete-list::-webkit-scrollbar-track { background: transparent; }
.autocomplete-list::-webkit-scrollbar-thumb { background: rgba(19,56,190,0.4); border-radius: 4px; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.ac-item:hover, .ac-item.active { background: var(--primary-subtle); color: var(--text); }
.ac-empty { padding: 12px; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ── Effects Builder ─────────────────────── */
.effects-list { display: flex; flex-direction: column; gap: 8px; }
.effect-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px auto;
  gap: 8px;
  align-items: center;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  animation: fadeUp 0.2s ease;
}
.effect-remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.effect-remove:hover { color: var(--error); background: rgba(255,71,87,0.12); }
.add-effect-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(19,56,190,0.08);
  border: 1px dashed rgba(19,56,190,0.3);
  border-radius: var(--radius-sm);
  color: #6ea3ff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  margin-top: 4px;
}
.add-effect-btn:hover {
  background: rgba(19,56,190,0.14);
  border-color: rgba(19,56,190,0.5);
}

/* ── Key-Value Builder ───────────────────── */
.kv-list { display: flex; flex-direction: column; gap: 8px; }
.kv-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  animation: fadeUp 0.2s ease;
}
.kv-remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.kv-remove:hover { color: var(--error); background: rgba(255,71,87,0.12); }
.add-kv-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(19,56,190,0.08);
  border: 1px dashed rgba(19,56,190,0.3);
  border-radius: var(--radius-sm);
  color: #6ea3ff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  margin-top: 4px;
}
.add-kv-btn:hover { background: rgba(19,56,190,0.14); border-color: rgba(19,56,190,0.5); }

/* ── Preview Panel ───────────────────────── */
.preview-wrap {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow: hidden;
  border-color: rgba(19,56,190,0.2);
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.preview-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
}
.preview-actions { display: flex; gap: 6px; }
.preview-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(19,56,190,0.3) transparent;
}
.preview-body::-webkit-scrollbar { width: 5px; }
.preview-body::-webkit-scrollbar-track { background: transparent; }
.preview-body::-webkit-scrollbar-thumb { background: rgba(19,56,190,0.3); border-radius: 4px; }
.yaml-pre {
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  background: none;
  color: var(--text-sec);
  white-space: pre;
  overflow-x: auto;
}
.yaml-pre code { background: none; font-family: inherit; }
.preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.preview-foot span { font-size: 11px; color: var(--text-muted); }
.valid-indicator { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); }
.valid-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 2s infinite; }
.valid-indicator.invalid { color: var(--error); }
.valid-indicator.invalid .valid-dot { background: var(--error); box-shadow: 0 0 8px var(--error); }

/* YAML Syntax Colors */
.yk  { color: #6ea3ff; }    /* key   */
.ys  { color: #00d4aa; }    /* string*/
.yn  { color: #ff9f43; }    /* number*/
.yb  { color: #c678dd; }    /* bool  */
.yc  { color: #555e75; }    /* comment*/
.yd  { color: #ff9f43; }    /* dash  */

/* ── Mobile Preview Toggle ───────────────── */
.mobile-preview-toggle { display: none; }

/* ── Tooltip ─────────────────────────────── */
.tooltip-overlay {
  position: fixed;
  z-index: 200;
  max-width: 300px;
  background: #0a1428;
  border: 1px solid rgba(19,56,190,0.4);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.15s ease;
  pointer-events: none;
}
.tooltip-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.tooltip-body  { font-size: 12px; color: var(--text-sec); line-height: 1.6; }
.tooltip-type  {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(19,56,190,0.18);
  color: #7db2ff;
  border: 1px solid rgba(19,56,190,0.3);
  font-family: var(--font-mono);
}

/* ── Toasts ──────────────────────────────── */
.toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: #0d1830;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  color: var(--text);
  pointer-events: auto;
  animation: fadeUp 0.25s ease;
  min-width: 240px;
  max-width: 360px;
}
.toast.success { border-color: rgba(0,229,160,0.3); }
.toast.error   { border-color: rgba(255,71,87,0.3); }
.toast.info    { border-color: rgba(19,56,190,0.4); }
.toast-icon.success { color: var(--success); }
.toast-icon.error   { color: var(--error); }
.toast-icon.info    { color: #6ea3ff; }
.toast.removing { animation: fadeIn 0.25s ease reverse forwards; }

/* ── Modal ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  max-width: 400px;
  width: 100%;
  padding: 32px;
  text-align: center;
  animation: scaleIn 0.2s ease;
  border-color: rgba(19,56,190,0.3);
}
.modal-icon { color: var(--warning); margin-bottom: 16px; display: flex; justify-content: center; }
.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.modal-box p  { font-size: 14px; color: var(--text-sec); margin-bottom: 24px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Scrollbar Global ────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(19,56,190,0.25) transparent;
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(19,56,190,0.25); border-radius: 4px; }

/* ── Misc Utilities ──────────────────────── */
.divider { height: 1px; background: var(--glass-border); margin: 4px 0; }
.color-swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

/* Tablet: ≤1100px */
@media (max-width: 1100px) {
  .plugins-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .creator-layout { grid-template-columns: 1fr; }
  .preview-wrap { position: static; max-height: none; }
  .preview-col { order: -1; }
  .preview-body { max-height: 260px; }
  .mobile-preview-toggle { display: none !important; }
  .hero-section { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(3,1fr); }
}

/* Mobile: ≤768px */
@media (max-width: 768px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: calc(var(--nav-height) + 24px);
  }

  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(6,12,30,0.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 99;
  }
  .nav-links.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); }
  .nav-divider { width: 100%; height: 1px; margin: 6px 0; }

  .hero-title { font-size: 38px; letter-spacing: -1px; }
  .hero-desc { font-size: 15px; }
  .hero-cta { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }

  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card.featured { order: -1; }
  .features-grid { grid-template-columns: 1fr; }
  .plugins-grid { grid-template-columns: 1fr; }

  .fields-grid { grid-template-columns: 1fr; }
  .effect-row { grid-template-columns: 1fr 80px 80px auto; gap: 6px; }

  .creator-header { flex-direction: column; }
  .creator-toolbar { width: 100%; }
  .creator-toolbar .btn { flex: 1; justify-content: center; }

  .preview-col { order: unset; }
  .preview-wrap { display: none; }
  .preview-wrap.mobile-visible { display: flex; }
  .mobile-preview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: rgba(19,56,190,0.1);
    border: 1px dashed rgba(19,56,190,0.3);
    border-radius: var(--radius-sm);
    color: #6ea3ff;
    font-size: 13px;
    font-weight: 600;
    justify-content: center;
    margin-bottom: 12px;
    cursor: pointer;
  }

  .toasts { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: 0; }
}

/* Small mobile: ≤480px */
@media (max-width: 480px) {
  .logo-sub { display: none; }
  .logo-sep { display: none; }
  .effect-row { grid-template-columns: 1fr 70px; }
  .effect-row .field-input:nth-child(2),
  .effect-row .field-input:nth-child(3) { display: none; }
  .kv-row { grid-template-columns: 1fr auto; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; justify-content: center; }
  .roles-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   LANGUAGE TOGGLE
   ══════════════════════════════════════ */
.lang-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-sec);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.lang-toggle-btn:hover {
  background: var(--glass-hover);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* ══════════════════════════════════════
   CUSTOM FLAGS BUILDER
   ══════════════════════════════════════ */
.cf-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.cf-empty {
  font-size: 13px; color: var(--text-muted);
  padding: 12px 0; text-align: center;
}
.cf-row {
  background: rgba(19,56,190,0.06);
  border: 1px solid rgba(19,56,190,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--transition);
}
.cf-row:hover { border-color: rgba(19,56,190,0.35); }
.cf-row-header {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.cf-flag-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 600;
  color: var(--primary-light);
  flex-shrink: 0;
}
.cf-flag-desc {
  font-size: 12px; color: var(--text-muted);
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cf-remove-btn {
  width: 24px; height: 24px;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  border-radius: var(--radius-sm); margin-left: auto; flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.cf-remove-btn:hover { background: rgba(220,53,69,0.15); color: #f87171; }
.cf-row-args {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(19,56,190,0.15);
}
.cf-arg-group {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.cf-arg-label {
  font-size: 12px; color: var(--text-sec); white-space: nowrap;
}
.cf-arg-group .field-input { min-width: 140px; flex: 1; }
.cf-candy-group { flex-direction: column; align-items: flex-start; gap: 6px; }
.cf-candy-wrap {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cf-add-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cf-add-row .cf-flag-select { flex: 1; min-width: 200px; }

/* ══════════════════════════════════════
   AUTH — Navbar area
   ══════════════════════════════════════ */
.nav-auth { display: flex; align-items: center; gap: 8px; }
.nav-auth-skeleton {
  width: 100px; height: 32px;
  background: var(--glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%,100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  border: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background var(--transition), transform var(--transition);
}
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }

.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-user-btn:hover { background: var(--glass-hover); border-color: var(--glass-border-hover); }
.nav-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.owner-crown { color: #ffd700; font-size: 11px; line-height: 1; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0a1428;
  border: 1px solid rgba(19,56,190,0.35);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 180px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.15s ease;
  display: none;
}
.user-dropdown.open { display: block; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-sec);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none; background: transparent; width: 100%; text-align: left;
}
.dropdown-item:hover { background: rgba(19,56,190,0.15); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(220,53,69,0.15); color: #f87171; }
.dropdown-divider { height: 1px; background: var(--glass-border); margin: 4px 0; }

/* ══════════════════════════════════════
   COMMUNITY PAGE
   ══════════════════════════════════════ */
.community-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px;
}

.comm-controls {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.comm-search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.comm-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.comm-search-input {
  width: 100%; padding: 8px 12px 8px 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  transition: border-color var(--transition);
}
.comm-search-input:focus { outline: none; border-color: var(--primary-light); }
.comm-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.comm-results-info {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px; min-height: 20px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.role-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
}
.role-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(19,56,190,0.18);
}
.role-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.role-card-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-card-desc {
  font-size: 13px; color: var(--text-sec);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5;
}
.role-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-muted);
  margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}
.role-card-author {
  display: flex; align-items: center; gap: 6px;
}
.role-card-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  object-fit: cover; border: 1px solid rgba(255,255,255,0.1);
}
.role-card-dl {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
}
.role-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid var(--glass-border);
}
.role-card-actions .btn { font-size: 11px; padding: 4px 10px; }

/* Owner badge on cards */
.role-card-owner-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; padding: 2px 7px;
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: var(--radius-full);
  color: #ffd700; font-weight: 600;
}

/* Skeleton loader */
.role-card-skeleton {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.skel-line {
  height: 12px; border-radius: 4px;
  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: skelShimmer 1.4s infinite;
}
@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-line.w-70  { width: 70%; }
.skel-line.w-50  { width: 50%; }
.skel-line.w-30  { width: 30%; }
.skel-line.h-8   { height: 8px; }
.skel-line.h-16  { height: 16px; }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin-bottom: 16px; }
.empty-state h3 { font-size: 17px; color: var(--text-sec); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; }

.load-more-wrap { text-align: center; padding-bottom: 20px; }

/* Unpublished draft indicator */
.draft-badge {
  font-size: 10px; padding: 2px 8px;
  background: rgba(255,160,0,0.12);
  border: 1px solid rgba(255,160,0,0.3);
  border-radius: var(--radius-full);
  color: #ffb347; font-weight: 600;
  white-space: nowrap;
}
.published-badge {
  font-size: 10px; padding: 2px 8px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-full);
  color: #4ade80; font-weight: 600;
  white-space: nowrap;
}

/* ══════════════════════════════════════
   PROFILE PAGE
   ══════════════════════════════════════ */
.profile-hero {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(19,56,190,0.5);
  box-shadow: 0 0 0 4px rgba(19,56,190,0.12);
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name {
  font-size: 24px; font-weight: 700;
  color: var(--text); margin: 0 0 4px;
}
.profile-meta { font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  background: rgba(19,56,190,0.15);
  border: 1px solid rgba(19,56,190,0.3);
  color: var(--primary-light);
}
.profile-badge-owner {
  background: rgba(255,215,0,0.12);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}

.my-roles-section { }
.my-roles-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.my-roles-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.roles-grid.my-roles .role-card { cursor: default; }
.roles-grid.my-roles .role-card:hover { transform: none; }

/* ══════════════════════════════════════
   ROLE DETAIL MODAL
   ══════════════════════════════════════ */
.role-detail-box {
  max-width: 680px; width: 100%;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 0;
  position: relative;
}
.modal-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-sec); z-index: 10;
  transition: background var(--transition), color var(--transition);
}
.modal-close-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.role-detail-inner {
  padding: 28px 28px 24px;
  overflow-y: auto; flex: 1;
}
.role-detail-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 16px;
}
.role-detail-title {
  font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px;
}
.role-detail-desc {
  font-size: 14px; color: var(--text-sec); line-height: 1.6;
  margin-bottom: 20px; white-space: pre-wrap;
}
.role-detail-author {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}
.role-detail-author img {
  width: 22px; height: 22px; border-radius: 50%;
}
.role-detail-yaml-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.role-detail-yaml-pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; line-height: 1.7;
  overflow-x: auto; max-height: 280px; overflow-y: auto;
  white-space: pre; color: var(--text-sec);
  margin-bottom: 20px;
}
.role-detail-footer {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 16px 28px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.15);
}
.role-detail-stats {
  display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
  flex: 1;
}
.role-detail-stats span { display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════
   RESPONSIVE — new components
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .community-header { flex-direction: column; }
  .comm-controls { flex-direction: column; align-items: stretch; }
  .comm-search-wrap { min-width: 0; }
  .comm-filters { justify-content: stretch; }
  .comm-filters select { flex: 1; }
  .profile-hero { flex-direction: column; text-align: center; align-items: center; }
  .profile-badges { justify-content: center; }
  .my-roles-header { flex-direction: column; align-items: flex-start; }
  .role-detail-box { max-height: 100vh; border-radius: 0; }
  .role-detail-inner { padding: 20px 16px; }
  .role-detail-footer { padding: 12px 16px; }
}

@media (max-width: 480px) {
  .roles-grid { grid-template-columns: 1fr; }
  .role-card-actions { flex-direction: column; }
  .role-card-actions .btn { width: 100%; justify-content: center; }
}
