:root {
  --bg: #0d0f14;
  --bg2: #141820;
  --card: #1a1f2a;
  --card2: #212735;
  --line: #2a3142;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --gold: #d4a017;
  --gold2: #f0c040;
  --red: #e5484d;
  --green: #30a46c;
  --blue: #3e8ed0;
  --purple: #8e4ec6;
  --radius: 12px;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- Butonlar ve formlar ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card2); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: .15s; text-decoration: none !important; }
.btn:hover { border-color: var(--gold); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: linear-gradient(135deg, var(--gold), #b8860b); color: #111; border: none; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.ghost { background: transparent; }
input, select, textarea { width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input[type=checkbox] { width: auto; transform: scale(1.2); }
input[type=color] { padding: 2px; height: 38px; width: 60px; }
textarea { min-height: 90px; resize: vertical; }
label.f { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.help { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Kartlar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat .v { font-size: 30px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card2); border: 1px solid var(--line); }
.badge.green { background: #12301f; color: #6bdc9b; border-color: #1f5a37; }
.badge.red { background: #3a1416; color: #ff8b8f; border-color: #6b2226; }
.badge.yellow { background: #3a2d0c; color: #ffd34d; border-color: #6b5313; }
.badge.purple { background: #2a1a3a; color: #c79bff; border-color: #4b2e6b; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--card2); flex: none; object-fit: cover; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: rgba(255,255,255,.02); }
.chip { display: inline-block; padding: 2px 8px; margin: 2px; border-radius: 6px; font-size: 12px; background: var(--card2); border: 1px solid var(--line); }

/* ---------- Panel düzeni ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { font-weight: 800; font-size: 17px; padding: 4px 10px 16px; color: var(--gold2); display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 0 14px rgba(240,192,64,.35); }
.hero-logo { width: 190px; height: 190px; border-radius: 28px; display: block; margin: 0 auto 26px; box-shadow: 0 0 60px rgba(240,192,64,.35), 0 0 0 1px rgba(240,192,64,.4); }
.side .grp { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 16px 10px 6px; }
.side a.nav { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.side a.nav:hover { background: var(--card); text-decoration: none; }
.side a.nav.active { background: var(--card2); color: var(--gold2); font-weight: 700; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 20px; border-top: 1px solid var(--line); }
.main { padding: 26px 30px; max-width: 1400px; width: 100%; }
.main > h1 { font-size: 24px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.tabs .btn.active { border-color: var(--gold); color: var(--gold2); }
.section { margin-bottom: 18px; }
.list-item { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0; }
.list-item .li-head { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
pre.log { background: #07080b; border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 480px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; }

/* ---------- Modal ve bildirim ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 20px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 4px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--card2); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 11px 15px; border-radius: 8px; max-width: 380px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

/* ---------- Tanıtım sitesi ---------- */
.site-nav { display: flex; align-items: center; gap: 18px; padding: 16px 6vw; position: sticky; top: 0; background: rgba(13,15,20,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 10; }
.site-nav .logo { font-weight: 900; font-size: 20px; color: var(--gold2); display: flex; align-items: center; gap: 10px; }
.site-nav .logo img { width: 34px; height: 34px; border-radius: 8px; }
.site-nav a.l { color: var(--text); font-size: 14px; }
.hero { padding: 60px 6vw 70px; text-align: center; background: radial-gradient(ellipse at top, rgba(212,160,23,.18), transparent 60%); }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 900; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(135deg, var(--gold2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 19px; color: var(--muted); max-width: 680px; margin: 10px auto 28px; }
.status-pill { display: inline-flex; gap: 10px; align-items: center; padding: 8px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); margin-bottom: 22px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.wrap { padding: 50px 6vw; max-width: 1200px; margin: 0 auto; }
.wrap h2 { font-size: 30px; text-align: center; margin-bottom: 28px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kurum-card { border-top: 4px solid var(--gold); }
.kurum-card h3 { display: flex; align-items: center; gap: 8px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps .card { position: relative; padding-top: 34px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #111; font-weight: 900; display: flex; align-items: center; justify-content: center; }
ol.rules { line-height: 1.8; padding-left: 20px; }
footer { text-align: center; padding: 30px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }

/* ---- Mobil */
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 82vw; max-width: 300px; height: 100vh; z-index: 60; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .side.open { transform: translateX(0); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50; padding: 10px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .main { padding: 14px; }
  .main h1 { font-size: 22px; }
  .site-nav .l { display: none; }
  .card { overflow-x: auto; }
  table { font-size: 13px; }
  th, td { padding: 6px 8px; }
  .grid2 { grid-template-columns: 1fr !important; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs .btn { white-space: nowrap; }
  .modal, .modal.wide { width: 96vw; max-width: 96vw; max-height: 92vh; overflow-y: auto; padding: 16px; }
  .row { flex-wrap: wrap; }
  input, select, textarea { font-size: 16px; } /* iOS yakınlaştırmasın */
}
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr !important; }
}

/* ---- Mağaza */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-v { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--gold2), #b8590b); box-shadow: 0 0 12px rgba(240, 160, 40, .25); }
.bar-l { font-size: 11px; color: var(--muted); margin-top: 6px; }
.bar:hover .bar-v { filter: brightness(1.2); }
.modal.wide { max-width: 860px; width: 96vw; max-height: 92vh; overflow-y: auto; }
.prod-img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin: 10px 0; border: 1px solid var(--line); }
.stat.hl { border-color: var(--gold); }
code { background: var(--card2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* ---- Byteforge mağaza sitesi */
body.bf { --gold: #e8901c; --gold2: #f7c948; }
.bf-hero { background: radial-gradient(ellipse at 50% 30%, rgba(255,122,24,.28), transparent 55%), radial-gradient(ellipse at 50% 100%, rgba(120,50,10,.35), transparent 60%), #0b0c0f; }
.bf .hero h1 span { background: linear-gradient(180deg, #fff1c1, #f7c948 45%, #d9771a 80%); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .04em; }
.bf .hero-logo { border-radius: 50%; box-shadow: 0 0 70px rgba(255,140,30,.45); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.prod { position: relative; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, border-color .15s; }
.prod:hover { transform: translateY(-3px); border-color: var(--gold); }
.prod-thumb { height: 160px; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 70%, #4a2309, #111317); display: flex; align-items: center; justify-content: center; font-size: 54px; margin-bottom: 6px; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-flag { position: absolute; top: 12px; right: 12px; }
.prod-desc { min-height: 40px; }
.prod-feat { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.prod-foot { margin-top: auto; padding-top: 8px; }
.price { font-size: 20px; color: var(--gold2); }
.stars { color: var(--gold2); font-size: 18px; letter-spacing: 2px; }
.faq { margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }

/* ---- Sunucu sağlığı */
.meter { height: 10px; border-radius: 99px; background: var(--card2); margin-top: 12px; overflow: hidden; border: 1px solid var(--line); }
.meter-v { height: 100%; border-radius: 99px; }
.meter-v.green { background: var(--green); }
.meter-v.yellow { background: #e5b33d; }
.meter-v.red { background: var(--red); }
.spark { width: 100%; height: 90px; display: block; margin: 8px 0 4px; }
.spark-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark-line { fill: none; stroke: var(--gold2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-area { fill: rgba(240, 192, 64, .12); }

/* ---- Ödeme ve hesabım */
.pay-wrap { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 30px 16px; background: radial-gradient(ellipse at 50% 20%, rgba(255,122,24,.18), transparent 60%); }
.pay-card { width: 100%; max-width: 460px; }
.pay-icon { font-size: 54px; margin-bottom: 6px; }
.lic { font-size: 13px; padding: 6px 8px; word-break: break-all; }

/* ---- Güncelleme */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(240, 192, 64, .06); }
.drop-ico { font-size: 40px; }

/* ---- Topluluk sayfaları */
.story { white-space: pre-wrap; line-height: 1.55; max-height: 260px; overflow: auto; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.decision { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--green); background: var(--card2); border-radius: 6px; }
.decision.purple { border-left-color: #9b59b6; }
.step { padding: 6px 0; border-bottom: 1px solid var(--line); }
.scroll-x { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; }
.heat th { padding: 2px 4px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.heat td { width: 26px; height: 22px; text-align: center; border-radius: 4px; padding: 0; }
.heat td.on { background: var(--green); color: #fff; }
.heat td.off { background: rgba(229, 72, 77, .35); }
.pollrow { margin-bottom: 8px; }
.pollrow .meter { margin-top: 4px; height: 8px; }
