:root{
  --bg0:#070A12;
  --bg1:#0B1020;
  --card:#0E1630cc;
  --card2:#0B1226cc;
  --text:#E7EEFF;
  --muted:#9AA8C7;
  --line:#1B2A52;
  --acc:#6EE7FF;
  --acc2:#A78BFA;
  --good:#34D399;
  --bad:#FB7185;
  --warn:#FBBF24;
  --shadow: 0 10px 40px rgba(0,0,0,.55);
  --r:16px;
  --r2:22px;
}
*{box-sizing:border-box}
html,body{height:100%}

/* ✅ Tek parça arka plan için body sade */
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height: 100%;
  overflow-x:hidden;
}

/* ✅ Tüm efekt tek katmanda: .bg (fixed canvas) */
.bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events:none;

  background:
    radial-gradient(1000px 600px at 15% 10%, rgba(110,231,255,.16), transparent 60%),
    radial-gradient(900px 600px at 85% 30%, rgba(167,139,250,.14), transparent 60%),
    radial-gradient(circle at 20% 15%, rgba(110,231,255,.06) 0, transparent 45%),
    radial-gradient(circle at 70% 35%, rgba(167,139,250,.06) 0, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(52,211,153,.04) 0, transparent 55%);

  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

/* ✅ Sayfa uzadıkça ikinci bir zemin basmasın */
.app{
  min-height:100%;
  display:flex;
  flex-direction:column;
  background: transparent;
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid rgba(27,42,82,.6);
  background: linear-gradient(180deg, rgba(14,22,48,.72), rgba(7,10,18,.2));
  backdrop-filter: blur(10px);
  position:sticky; top:0; z-index:50;
  overflow: visible; /* mobil drawer kırpılmasın */
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:40px; height:40px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(110,231,255,.25), rgba(167,139,250,.25));
  border:1px solid rgba(110,231,255,.28);
  box-shadow: 0 0 0 6px rgba(110,231,255,.04);
  font-weight:800;
}
.brand-text .name{font-weight:800; letter-spacing:.2px}
.brand-text .tag{font-size:12px; color:var(--muted)}

.navlink{
  text-decoration:none; color:var(--text);
  font-size:14px; padding:10px 12px; border-radius:12px;
  border:1px solid transparent;
  transition: transform .15s ease, background .15s ease, border .15s ease;
}
.navlink:hover{transform: translateY(-1px); background: rgba(14,22,48,.55); border-color: rgba(27,42,82,.8)}
.navlink.btn{
  background: linear-gradient(135deg, rgba(110,231,255,.18), rgba(167,139,250,.18));
  border-color: rgba(110,231,255,.28);
}

.lang{display:flex; gap:8px}
.pill{
  font-size:12px; text-decoration:none; color:var(--muted);
  padding:7px 10px; border-radius:999px;
  border:1px solid rgba(27,42,82,.8);
  background: rgba(11,16,32,.55);
}
.pill:hover{color:var(--text); border-color: rgba(110,231,255,.28)}
.container{width:min(1100px, calc(100% - 40px)); margin:24px auto; flex:1}
.grid3{display:grid; gap:14px; grid-template-columns: repeat(3, 1fr)}
@media (max-width: 980px){ .grid3{grid-template-columns:1fr} }

.card{
  background: linear-gradient(180deg, rgba(14,22,48,.75), rgba(11,18,38,.45));
  border:1px solid rgba(27,42,82,.75);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding:18px;
}
.card h2{margin:0 0 6px 0; font-size:20px}
.card p{margin:0; color:var(--muted); line-height:1.55}
.hero{
  display:grid; grid-template-columns: 1.2fr .8fr; gap:14px; align-items:stretch;
}
@media (max-width: 980px){ .hero{grid-template-columns:1fr} }
.kpi{display:grid; gap:10px}
.kpi .tile{
  background: rgba(14,22,48,.55);
  border:1px solid rgba(27,42,82,.75);
  border-radius: var(--r);
  padding:14px;
}
.kpi .tile .big{font-size:22px; font-weight:800}
.kpi .tile .sub{font-size:12px; color:var(--muted)}
.form{display:grid; gap:10px}
.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(27,42,82,.85);
  background: rgba(7,10,18,.55);
  color:var(--text);
  outline:none;
}
.input:focus{border-color: rgba(110,231,255,.45); box-shadow: 0 0 0 4px rgba(110,231,255,.07)}
.row{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width: 720px){ .row{grid-template-columns:1fr} }
.btn{
  cursor:pointer;
  border:1px solid rgba(110,231,255,.28);
  background: linear-gradient(135deg, rgba(110,231,255,.18), rgba(167,139,250,.18));
  color:var(--text);
  border-radius:14px;
  padding:12px 12px;
  font-weight:700;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover{transform: translateY(-1px); filter: brightness(1.06)}
.btn.ghost{
  border-color: rgba(27,42,82,.85);
  background: rgba(11,16,32,.45);
  color: var(--muted);
}
.muted{color:var(--muted)}
.sep{height:1px; background: rgba(27,42,82,.75); margin:14px 0}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; padding:6px 10px; border-radius:999px;
  border:1px solid rgba(27,42,82,.85);
  background: rgba(11,16,32,.55);
  color: var(--muted);
}
.badge.good{border-color: rgba(52,211,153,.35); color: rgba(52,211,153,.95)}
.badge.bad{border-color: rgba(251,113,133,.35); color: rgba(251,113,133,.95)}
.table{width:100%; border-collapse: collapse; overflow:hidden; border-radius: var(--r)}
.table th,.table td{padding:12px 10px; border-bottom:1px solid rgba(27,42,82,.65); font-size:13px}
.table th{color:var(--muted); text-align:left; font-weight:600; background: rgba(11,16,32,.55)}
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}
.toast{
  position: fixed; right: 16px; bottom: 16px;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(27,42,82,.85);
  background: rgba(7,10,18,.85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--text);
  display:none;
}
.footer{
  border-top:1px solid rgba(27,42,82,.6);
  padding: 16px 20px;
  background: rgba(7,10,18,.35);
}
.foot-inner{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:12px}

/* Coin cards */
.grid.coins{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:10px}
.coin-card{display:flex;justify-content:space-between;align-items:center;padding:12px 12px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:rgba(11,16,32,.55);text-decoration:none;color:inherit;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.coin-card:hover{transform:translateY(-1px);border-color:rgba(99,102,241,.35);background:rgba(11,16,32,.72)}
.coin-card.active{border-color:rgba(99,102,241,.55);background:rgba(11,16,32,.85);box-shadow:0 0 0 1px rgba(99,102,241,.15) inset}
.coin-left{display:flex;gap:10px;align-items:center}
.coin-ico{width:34px;height:34px;border-radius:12px}
.coin-sym{font-weight:700;letter-spacing:.2px}
.coin-net{font-size:12px;color:rgba(226,232,240,.7)}
.coin-right{text-align:right}
.coin-bal{font-weight:700}
.coin-usd{font-size:12px;color:rgba(226,232,240,.75)}

/* ===== Mobile: Transactions/History overflow fix (NO layout changes elsewhere) ===== */
@media (max-width: 768px){
  .card{ max-width: 100%; overflow: hidden; }
  .table{
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .table thead,
  .table tbody{ width: max-content; }
  .table th,
  .table td{
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .table td.code,
  .table th.code{
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.brand-logo{
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 6px;
}

/* Home Live Transfers widget */
.home-transfers .ht-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-transfers .ht-title{display:flex;align-items:center;gap:10px}
.home-transfers .ht-dot{width:10px;height:10px;border-radius:999px;background:rgba(99,102,241,.9);box-shadow:0 0 0 6px rgba(99,102,241,.12)}
.home-transfers .ht-h{font-weight:800;letter-spacing:.2px}
.home-transfers .ht-sub{font-size:12px;color:rgba(226,232,240,.75)}
.home-transfers .ht-actions{display:flex;gap:8px}

.home-transfers .ht-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.home-transfers .ht-loading{padding:10px}

.home-transfers .ht-card{
  border:1px solid rgba(148,163,184,.18);
  background:rgba(11,16,32,.55);
  border-radius:14px;
  padding:12px;
  transform:translateY(6px);
  opacity:0;
  overflow:hidden;
}
.home-transfers .ht-card.in{animation:htIn .35s ease forwards}
@keyframes htIn{ to{transform:translateY(0);opacity:1} }

.home-transfers .ht-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.home-transfers .ht-asset{display:flex;align-items:center;gap:10px}
.home-transfers .ht-ico{width:28px;height:28px;border-radius:10px;object-fit:contain}
.home-transfers .ht-ico.ph{background:rgba(148,163,184,.12)}
.home-transfers .ht-sym{font-weight:800}
.home-transfers .ht-net{font-size:12px;color:rgba(226,232,240,.7)}
.home-transfers .ht-amt{font-weight:900}
.home-transfers .ht-mid{margin-top:10px;display:grid;gap:6px}
.home-transfers .ht-line{display:flex;justify-content:space-between;gap:10px}
.home-transfers .ht-bot{margin-top:10px;font-size:12px}

/* HOME – more cards */
.home-transfers .ht-card{ padding: 10px; }
.home-transfers .ht-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-transfers .ht-card.out{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
}
.home-transfers .ht-card.pulse{
  box-shadow: 0 0 0 1px rgba(99,102,241,.18) inset, 0 0 22px rgba(99,102,241,.12);
}
@media (max-width: 980px){ .home-transfers .ht-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width: 640px){ .home-transfers .ht-grid{grid-template-columns:1fr} }

/* =========================================
   MOBILE NAV - FINAL (matches nav.php)
   <nav class="nav-links" data-nav-menu>
   ========================================= */

/* Hamburger */
.nav-toggle{
  display:none;
  width:44px;height:44px;
  border:1px solid rgba(148,163,184,.22);
  background:rgba(11,16,32,.45);
  border-radius:12px;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.nav-toggle span{
  display:block;
  width:18px;height:2px;
  background:rgba(226,232,240,.9);
  border-radius:999px;
}

/* Desktop menu */
.nav-links[data-nav-menu]{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Mobile drawer (NO display:none toggling) */
@media (max-width: 980px){

  .nav-toggle{ display:inline-flex; }

  .nav-links[data-nav-menu]{
    position: fixed;
    left: 14px;
    right: 14px;
    top: 74px;
    z-index: 2147483647;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(11,16,32,.92);
    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  }

  body.nav-open .nav-links[data-nav-menu]{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links[data-nav-menu] .navlink{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.14);
    background: rgba(148,163,184,.06);
    text-decoration:none;
  }

  .nav-links[data-nav-menu] .navlink:hover{
    background: rgba(14,22,48,.65);
    border-color: rgba(110,231,255,.22);
    transform: none;
  }

  body.nav-open{ overflow: hidden; }
}
@media (max-width: 980px){
  .nav-links[data-nav-menu]{
    z-index: 2147483647 !important;
  }
}

/* ================================
   TOPBAR – MOBILE DYNAMIC LAYOUT
   ================================ */

.topbar{ gap: 12px; }

.brand{ min-width: 0; }
.brand-text{ min-width: 0; }
.brand-text .name,
.brand-text .tag{
  max-width: 52vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px){
  .topbar{ padding: 12px 14px; }
  .brand-logo{ width: 28px; height: 28px; margin-right: 8px; }
  .nav-toggle{ flex: 0 0 auto; }
  .topbar .badge{ font-size: 11px; padding: 5px 8px; }
}

/* ================================
   LANGUAGE DROPDOWN
   ================================ */

.lang-dd{
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn{
  cursor: pointer;
  border: 1px solid rgba(27,42,82,.85);
  background: rgba(11,16,32,.55);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-btn:hover{ border-color: rgba(110,231,255,.28); }

.lang-btn .chev{
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(226,232,240,.7);
  border-bottom: 2px solid rgba(226,232,240,.7);
  transform: rotate(45deg);
  margin-top: -2px;
}

.lang-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 120px;

  border: 1px solid rgba(148,163,184,.22);
  background: rgba(11,16,32,.92);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 8px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  z-index: 2147483647;
}

body.lang-open .lang-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(148,163,184,.14);
  background: rgba(148,163,184,.06);
  font-size: 13px;
}

.lang-item:hover{
  background: rgba(14,22,48,.65);
  border-color: rgba(110,231,255,.22);
}
