/* ============================================================
   SFButler Plus — Shared stylesheet (S.58)
   Extracted from web/index.html so each page (index, players,
   admin, support, config) can <link> it instead of duplicating.
   shop.html keeps its own inline styles for now.
   ============================================================ */

@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.5} }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none} }
@keyframes slideIn { from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:none} }
@keyframes spin { to{transform:rotate(360deg)} }

:root {
  --bg-void: #06060b;
  --bg-deep: #0c0c14;
  --bg-card: #12121e;
  --bg-card-hover: #18182a;
  --bg-nav: rgba(6,6,11,0.92);
  --border: #22223a;
  --border-light: #333358;
  --border-accent: rgba(129,140,248,0.25);
  --text-primary: #f0f0ff;
  --text-body: #cccce0;
  --text-secondary: #9999b8;
  --text-muted: #6e6e90;
  --silver: #d0d0e0;
  --silver-bright: #eaeaf8;
  --accent: #6366f1;
  --accent-light: #a5b4fc;
  --accent-glow: rgba(99,102,241,0.10);
  --green: #4ade80;
  --green-soft: rgba(74,222,128,0.12);
  --amber: #fbbf24;
  --red: #f87171;
  --purple: #a78bfa;
  --font-display: 'Cinzel', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
.nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 56px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-brand img { height: 32px; border-radius: 6px; }
.nav-brand span { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--silver-bright); letter-spacing: 1px; }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); padding: 8px 16px; border-radius: 8px;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-tab.active { color: var(--accent-light); background: var(--accent-glow); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.nav-dot.off { background: var(--text-muted); box-shadow: none; animation: none; }
.nav-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); }
.nav-user img { width: 24px; height: 24px; border-radius: 50%; }
.nav-user span { font-size: 0.78rem; color: var(--text-body); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-login {
  background: linear-gradient(135deg, #5865F2, #4752C4); color: #fff; border: none;
  padding: 6px 16px; border-radius: 8px; font-size: 0.78rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; transition: transform 0.2s;
}
.nav-login:hover { transform: translateY(-1px); }

@media (max-width: 768px) {
  .nav { padding: 0 12px; flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .nav-tabs { order: 3; width: 100%; overflow-x: auto; padding: 4px 0; }
  .nav-tab { font-size: 0.75rem; padding: 6px 10px; white-space: nowrap; }
  .nav-right .nav-dot, .nav-right > span { display: none; }
}

/* LAYOUT */
.app { padding-top: 56px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.page { animation: fadeUp 0.35s ease-out; }

/* HERO */
.hero { text-align: center; padding: 72px 0 56px; position: relative; }
.hero::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 700px; height: 500px; background: radial-gradient(ellipse, rgba(99,102,241,0.07) 0%, transparent 70%); pointer-events: none; }
.hero-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.4rem); color: var(--text-primary); letter-spacing: 2px; }
.hero-title em { font-style: normal; color: var(--accent-light); }
.hero-tagline { font-size: 1.15rem; color: var(--text-secondary); margin-top: 10px; font-weight: 300; font-style: italic; }
.hero-desc { max-width: 680px; margin: 20px auto 0; font-size: 1rem; color: var(--text-body); line-height: 1.85; }
.status-bar { display: flex; justify-content: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 7px 16px; font-size: 0.82rem; color: var(--text-body); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.chip-dot.off { background: var(--text-muted); box-shadow: none; animation: none; }
.cta-row { display: flex; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 28px; border-radius: 10px; border: none; cursor: pointer; font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; letter-spacing: 0.5px; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #5865F2, #4752C4); color: #fff; box-shadow: 0 4px 24px rgba(88,101,242,0.35); }
.btn-secondary { background: var(--bg-card); color: var(--silver-bright); border: 1px solid var(--border-light); }
.btn-sm { padding: 8px 18px; font-size: 0.78rem; border-radius: 8px; }
.btn-danger { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.25); }

/* SECTIONS */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-light); margin-bottom: 8px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.3rem,3vw,1.9rem); font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.section-desc { font-size: 0.95rem; color: var(--text-body); max-width: 640px; margin-bottom: 36px; line-height: 1.85; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; transition: border-color 0.3s, transform 0.2s; }
.card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.card-title { font-family: var(--font-display); font-size: 0.92rem; color: var(--text-primary); margin-bottom: 6px; font-weight: 600; }
.card-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.plus-tag { display: inline-block; background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); border-radius: 4px; padding: 1px 7px; font-size: 0.6rem; font-family: var(--font-mono); color: var(--accent-light); letter-spacing: 1px; margin-left: 6px; vertical-align: middle; }

/* Architecture */
.arch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; margin-top: 28px; }
.arch-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; text-align: center; }
.arch-box.highlight { border-color: var(--border-accent); background: linear-gradient(180deg, rgba(99,102,241,0.04) 0%, var(--bg-card) 100%); }
.arch-icon { font-size: 2rem; margin-bottom: 10px; }
.arch-name { font-family: var(--font-display); font-size: 0.9rem; color: var(--text-primary); margin-bottom: 6px; }
.arch-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }

/* Compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }
.compare-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.compare-col.accent { border-color: var(--border-accent); }
.compare-col h3 { font-family: var(--font-display); font-size: 1rem; color: var(--text-primary); margin-bottom: 16px; }
.compare-col li { font-size: 0.88rem; color: var(--text-body); margin-bottom: 8px; list-style: none; padding-left: 20px; position: relative; }
.compare-col li::before { content: '\2713'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* Bot commands */
.cmd-group { margin-bottom: 32px; }
.cmd-group-title { font-family: var(--font-display); font-size: 1rem; color: var(--accent-light); margin-bottom: 12px; }
.cmd { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.cmd-name { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-light); white-space: nowrap; min-width: 120px; }
.cmd-desc { font-size: 0.85rem; color: var(--text-body); }

/* Placeholder */
.placeholder { text-align: center; padding: 100px 24px; }
.placeholder-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.placeholder-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-secondary); margin-bottom: 8px; }
.placeholder-desc { font-size: 0.9rem; color: var(--text-muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 24px; text-align: center; }
.footer-row { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.footer-logo { height: 36px; border-radius: 50%; opacity: 0.7; }
.footer p { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.footer a { color: var(--text-secondary); }

/* ============================================================
   SHOP (S.26)
   ============================================================ */
.shop-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.shop-search { flex: 1; min-width: 200px; padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.88rem; outline: none; }
.shop-search:focus { border-color: var(--accent); }
.cat-pill { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.cat-pill:hover { border-color: var(--border-light); color: var(--text-body); }
.cat-pill.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-light); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.2s; }
.shop-item:hover { border-color: var(--border-light); transform: translateY(-2px); }
.shop-item-cat { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: var(--purple); margin-bottom: 8px; }
.shop-item-name { font-family: var(--font-display); font-size: 0.95rem; color: var(--text-primary); margin-bottom: 6px; }
.shop-item-desc { font-size: 0.8rem; color: var(--text-secondary); flex: 1; line-height: 1.6; margin-bottom: 14px; }
.shop-item-footer { display: flex; align-items: center; justify-content: space-between; }
.shop-price { font-family: var(--font-mono); font-size: 0.92rem; color: var(--amber); font-weight: 600; }
.shop-buy { padding: 6px 16px; border-radius: 8px; border: 1px solid var(--green); background: var(--green-soft); color: var(--green); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.shop-buy:hover { background: rgba(74,222,128,0.22); }
.shop-buy:disabled { opacity: 0.4; cursor: not-allowed; }
.shop-balance { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }

/* ADMIN DASHBOARD (S.26) */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px; }
.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.dash-card-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.dash-card-value { font-family: var(--font-display); font-size: 1.6rem; color: var(--text-primary); }
.dash-card-sub { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; }

/* Modal overlay */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 200; display: flex; align-items: center; justify-content: center; animation: fadeUp 0.2s; }
.modal { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 16px; padding: 32px; max-width: 420px; width: 90%; }
.modal h3 { font-family: var(--font-display); color: var(--text-primary); margin-bottom: 12px; }
.modal p { font-size: 0.9rem; color: var(--text-body); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 300; padding: 14px 24px; border-radius: 10px; font-size: 0.85rem; animation: slideIn 0.3s; max-width: 360px; }
.toast.success { background: rgba(74,222,128,0.15); border: 1px solid rgba(74,222,128,0.3); color: var(--green); }
.toast.error { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent-light); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }

/* ============================================================
   SF-SLIDER — Gradient slider component (S.27)
   ============================================================ */
.sf-slider { position: relative; padding: 2px 0; }
.sf-slider-track {
  position: relative; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 25%, #22c55e 50%, #14b8a6 75%, #6366f1 100%);
  opacity: 0.35;
}
.sf-slider-fill {
  position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 25%, #22c55e 50%, #14b8a6 75%, #6366f1 100%);
  transition: width 0.12s ease;
}
.sf-slider-thumb {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-deep); border: 2.5px solid var(--accent-light);
  box-shadow: 0 0 8px rgba(99,102,241,0.35);
  transition: left 0.12s ease, border-color 0.15s;
  pointer-events: none;
}
.sf-slider-input {
  position: absolute; top: -4px; left: 0; width: 100%; height: 24px;
  opacity: 0; cursor: pointer; z-index: 2; margin: 0;
}
.sf-slider-value {
  font-family: var(--font-mono); font-weight: 700; min-width: 32px;
  text-align: right; font-size: 0.92rem; transition: color 0.15s;
}
.sf-slider-off { color: var(--text-muted) !important; }

/* Store Config (S.27) */
.store-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .store-form { grid-template-columns: 1fr; } }
.store-form label { font-size: 0.78rem; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.store-form input, .store-form select, .store-form textarea {
  width: 100%; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.85rem; outline: none;
}
.store-form input:focus, .store-form select:focus, .store-form textarea:focus { border-color: var(--accent); }
.store-form .full { grid-column: 1 / -1; }
.store-item-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; transition: border-color 0.2s;
}
.store-item-row:hover { border-color: var(--border-light); }

/* Discount badge */
.price-original { text-decoration: line-through; color: var(--text-muted); font-size: 0.78rem; margin-right: 6px; }
.price-discount { background: rgba(74,222,128,0.12); color: var(--green); font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; margin-left: 6px; }

/* Save bar */
.save-bar {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(6,6,11,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-accent);
  padding: 14px 24px; display: flex; justify-content: space-between; align-items: center;
  animation: slideIn 0.3s ease;
}
