/* =====================================================================
   Tampilan hidup: latar, kaca, gerak, kartu IP (dimuat setelah style.css)
   ===================================================================== */
:root { --mx: 0; --my: 0; --glow: rgba(123,192,67,.35); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(108,193,107,.55); } 70% { box-shadow: 0 0 0 7px rgba(108,193,107,0); } 100% { box-shadow: 0 0 0 0 rgba(108,193,107,0); } }
@keyframes drift { 0% { transform: translate3d(-3%, -2%, 0) scale(1); } 50% { transform: translate3d(3%, 2%, 0) scale(1.08); } 100% { transform: translate3d(-3%, -2%, 0) scale(1); } }
@keyframes float { from { transform: translate3d(0, 110vh, 0) rotate(0); opacity: 0; } 10% { opacity: .22; } 90% { opacity: .22; } to { transform: translate3d(var(--sw), -20vh, 0) rotate(var(--rot)); opacity: 0; } }
@keyframes shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--bg); }
#bg::before { content: ""; position: absolute; inset: -12%; animation: drift 28s ease-in-out infinite;
    background:
        radial-gradient(42% 38% at 12% 8%, rgba(123,192,67,.20), transparent 70%),
        radial-gradient(38% 36% at 92% 18%, rgba(111,185,198,.13), transparent 70%),
        radial-gradient(46% 42% at 78% 100%, rgba(201,166,107,.12), transparent 70%),
        radial-gradient(30% 30% at 30% 85%, rgba(123,192,67,.09), transparent 70%); }
#bg::after { content: ""; position: absolute; inset: 0; opacity: .9;
    background-image: linear-gradient(rgba(123,192,67,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(123,192,67,.05) 1px, transparent 1px);
    background-size: 36px 36px; transform: translate3d(calc(var(--mx) * -14px), calc(var(--my) * -14px), 0);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 78%); }
#bg i { position: absolute; bottom: 0; border-radius: 2px; opacity: 0; animation: float linear infinite;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), inset 0 3px 0 rgba(255,255,255,.16), inset 3px 0 0 rgba(255,255,255,.06); }
#authView, #appView { position: relative; z-index: 1; }

/* panel kaca */
.panel { background: linear-gradient(180deg, rgba(34,40,31,.78), rgba(21,24,19,.82)); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
    border-color: rgba(123,192,67,.14); animation: rise .45s cubic-bezier(.2,.7,.2,1) both; transition: border-color .2s, box-shadow .2s; }
.panel:hover { border-color: rgba(123,192,67,.28); }
.panel-h { background: linear-gradient(90deg, rgba(123,192,67,.10), rgba(31,36,29,.6) 60%); }
.panel-h::before { animation: pulse 2.6s infinite; }
.stack > .panel:nth-child(2) { animation-delay: .06s; }
.stack > .panel:nth-child(3) { animation-delay: .12s; }
.col-log .panel { animation-delay: .1s; }
.cards { background: rgba(23,26,21,.7); backdrop-filter: blur(10px); border-color: rgba(123,192,67,.14); }
.top { background: rgba(12,14,11,.72); backdrop-filter: blur(14px) saturate(1.3); }
.modal { background: linear-gradient(180deg, #1d221b, #151813); border-color: rgba(123,192,67,.25); box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(123,192,67,.06); animation: rise .25s ease both; }
.modal-bg { backdrop-filter: blur(4px); }

/* tombol */
.btn.primary { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 0 0 var(--glow); transition: box-shadow .2s, background .12s, transform .06s; }
.btn.primary:hover:not(:disabled) { box-shadow: 0 0 18px 0 var(--glow); background: linear-gradient(180deg, #a9e86f, var(--accent-hi)); }
.btn:not(.primary):not(.ghost):not(.danger):hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(123,192,67,.25); }

/* kartu bot */
.bcard { transition: background .15s, transform .15s; }
.bcard:hover { transform: translateX(3px); }
.sd.online { animation: pulse 2s infinite; }
.av { transition: box-shadow .2s; }
.bcard:hover .av, .bcard.sel .av { box-shadow: 0 0 0 2px rgba(123,192,67,.35); }
.av.sm { width: 26px; height: 26px; font-size: 12px; border-radius: 3px; }
.av.sm .sd { width: 8px; height: 8px; right: -3px; bottom: -3px; border-width: 1.5px; }
.tag.ip { color: var(--info); border-color: #2c4b52; background: rgba(111,185,198,.08); }
.hero { background: linear-gradient(180deg, rgba(41,50,36,.8), rgba(21,24,19,.85)); }
.hero h2 { text-shadow: 0 2px 0 rgba(0,0,0,.4); }

/* login */
.auth-side { background: radial-gradient(120% 80% at 80% 100%, rgba(123,192,67,.16), transparent 60%), rgba(18,21,16,.72); backdrop-filter: blur(8px); }
.auth-box { padding: 28px 26px 24px; background: linear-gradient(180deg, rgba(34,40,31,.78), rgba(21,24,19,.84)); backdrop-filter: blur(12px); border: 1px solid rgba(123,192,67,.2); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.45); animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.block-art { transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 14px), 0); animation: none; transition: transform .25s ease-out; }
.hero-title em { background: linear-gradient(90deg, var(--accent), #c4f08a, var(--accent)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; margin-top: -14px; }
.chips span { font: 12px var(--mono); padding: 4px 11px; border: 1px solid rgba(123,192,67,.25); border-radius: 999px; background: rgba(123,192,67,.07); color: #b9d9a0; transition: transform .15s, background .15s; }
.chips span:hover { transform: translateY(-2px); background: rgba(123,192,67,.16); }
.sample { background: rgba(8,9,8,.7); }

/* admin: sub-navigasi */
.admin { max-width: 1180px; }
.apane { display: grid; gap: 20px; }
.subnav { display: inline-flex; gap: 2px; padding: 3px; background: rgba(12,13,12,.7); border: 1px solid var(--line); border-radius: 10px; justify-self: start; backdrop-filter: blur(8px); }
.subnav button { background: none; border: 0; border-radius: 7px; padding: 7px 18px; cursor: pointer; color: var(--muted); font-weight: 500; transition: color .15s, background .15s; }
.subnav button:hover { color: var(--text); }
.subnav button.active { background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: 0 0 16px rgba(123,192,67,.3); }

/* statistik */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { position: relative; overflow: hidden; padding: 14px 16px 13px; border: 1px solid rgba(123,192,67,.16); border-radius: 8px; background: linear-gradient(160deg, rgba(41,50,36,.75), rgba(21,24,19,.85)); animation: rise .5s both; animation-delay: calc(var(--i) * 70ms); }
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, rgba(123,192,67,.22), transparent 70%); }
.stat .k { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font: 600 30px/1.2 var(--pixel); color: var(--accent-hi); margin: 2px 0; }
.stat .s { font: 11.5px var(--mono); color: var(--faint); }

/* kartu IP */
.ipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ipcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid rgba(123,192,67,.16); border-radius: 10px;
    background: linear-gradient(170deg, rgba(36,43,32,.82), rgba(19,22,17,.9)); backdrop-filter: blur(10px);
    animation: rise .5s both; animation-delay: calc(var(--i) * 45ms); transition: transform .2s, border-color .2s, box-shadow .2s; }
.ipcard:hover { transform: translateY(-4px); border-color: rgba(123,192,67,.45); box-shadow: 0 14px 34px rgba(0,0,0,.4), 0 0 24px rgba(123,192,67,.12); }
.ipcard.full { border-color: rgba(224,165,58,.3); }
.ipcard.direct { border-style: dashed; }
.ipcard header { display: flex; align-items: center; gap: 11px; }
.ipn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font: 600 14px var(--pixel); color: var(--on-accent); background: var(--accent); border-radius: 4px; box-shadow: inset 0 -4px 0 var(--accent-dk), inset 0 3px 0 var(--accent-hi); }
.ipcard.direct .ipn { background: var(--oak); box-shadow: inset 0 -4px 0 #8a6b36, inset 0 3px 0 #e2c690; }
.ipt { min-width: 0; flex: 1; }
.ipt b { display: block; font: 500 15px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ipt small { font: 11.5px var(--mono); color: var(--faint); }
.ipcard .cnt { font: 600 12px var(--mono); padding: 2px 9px; border-radius: 999px; border: 1px solid #2f4a2e; color: var(--accent-hi); }
.ipcard .cnt.full { color: var(--warn); border-color: #5a4619; }
.slots { display: flex; gap: 6px; }
.slot { flex: 1; height: 34px; display: grid; place-items: center; border: 1px dashed var(--line2); border-radius: 5px; background: rgba(0,0,0,.25); }
.slot.full { border-style: solid; border-color: rgba(123,192,67,.3); background: rgba(123,192,67,.07); }
.irows { display: grid; gap: 6px; min-height: 40px; }
.irow { display: flex; align-items: center; gap: 9px; padding: 5px 8px; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 5px; }
.irow .nm { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow small { display: block; font: 11px var(--mono); color: var(--faint); font-weight: 400; }
.irow .x { background: none; border: 0; color: var(--faint); font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 4px; transition: color .12s, background .12s; }
.irow .x:hover { color: #f0928a; background: rgba(229,103,93,.12); }
.ipcard .btn.block { margin-top: auto; padding: 6px 12px 5px; }
.chipsrow { display: flex; flex-wrap: wrap; gap: 8px; }
.bchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 7px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(0,0,0,.25); }
.bchip small { display: block; font: 11px var(--mono); color: var(--faint); line-height: 1.1; }

/* modal pilih akun */
.modal h3 .mono { font-family: var(--mono); font-weight: 500; color: var(--accent-hi); }
.pick { max-height: 46vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.grp { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 12px 2px 4px; }
.pick .chk { border-radius: 5px; padding: 7px 8px; border-bottom: 0; transition: background .12s; }
.pick .chk:hover { background: rgba(123,192,67,.08); }
.counter { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; margin-bottom: 8px; border-radius: 6px; background: rgba(123,192,67,.08); border: 1px solid rgba(123,192,67,.2); font-size: 12.5px; color: var(--muted); }
.counter b { font: 600 14px var(--mono); color: var(--accent-hi); }
.counter.full { background: rgba(224,165,58,.08); border-color: rgba(224,165,58,.3); }
.counter.full b { color: var(--warn); }

@media (max-width: 640px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .ipgrid { grid-template-columns: 1fr; }
    .subnav { justify-self: stretch; }
    .subnav button { flex: 1; padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    #bg::before, #bg i, .panel, .stat, .ipcard, .hero-title em, .sd.online, .panel-h::before, .auth-box { animation: none !important; }
}

/* banner perpanjang masa aktif */
.expbanner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px; background: rgba(230,180,50,.14); border-bottom: 1px solid rgba(230,180,50,.4); color: #f0d68a; font-size: 14px; text-align: center; }
.expbanner.over { background: rgba(220,70,60,.16); border-bottom-color: rgba(220,70,60,.45); color: #f3b0aa; }
.expbanner.hidden { display: none; }
