/* ===== Kreditai page (credits.html) =====
   Page-only parts. Tokens, background, shell, buttons, toasts and the shared
   kx-* pieces come from dashboard.css, which every Valdymo skydas page loads. */

.kx-main { padding-top: 1.5rem; padding-bottom: 5rem; }
@media (max-width: 900px) { .kx-main { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); } }

/* ---------- Hero ---------- */
.kx-hero {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.75rem;
  padding: 1.75rem 2rem; overflow: hidden;
  border: 1px solid var(--l1); border-radius: 18px;
  background:
    radial-gradient(520px 220px at 12% 0%, rgba(255,255,255,.06), transparent 70%),
    linear-gradient(180deg, var(--s1), rgba(13,13,13,.8));
}
.kx-hero-coin { position: relative; width: 112px; height: 112px; }
.kx-hero-coin::after {
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -6px; height: 14px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.7), transparent); animation: kxShadow 6s ease-in-out infinite;
}
.kx-hero-coin img { width: 100%; height: 100%; object-fit: contain; animation: kxFloat 6s ease-in-out infinite; filter: drop-shadow(0 10px 22px rgba(0,0,0,.55)); }
@keyframes kxFloat { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
@keyframes kxShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.8); opacity: .55; } }
.kx-bal { display: flex; align-items: baseline; gap: .6rem; margin: .45rem 0 0; }
.kx-bal-num { font-size: clamp(40px, 5vw, 56px); font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.kx-bal-unit { font-size: 16px; color: var(--mut); font-weight: 500; }
.kx-hero-info { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-top: .85rem; font-size: 13px; color: var(--mut); }
.kx-hero-info .kx-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--l3); }
.kx-hero-info b { color: var(--ink2); font-weight: 500; }
.kx-hero-cta { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.kx-hero-cta .kx-btn { height: 46px; padding: 0 1.6rem; }
.kx-hero-cta p { font-size: 12px; color: var(--faint); margin: 0; display: flex; align-items: center; gap: .4rem; }
.kx-hero-cta p svg { width: 13px; height: 13px; color: var(--green); }
@media (max-width: 760px) {
  .kx-hero { grid-template-columns: auto 1fr; padding: 1.4rem; gap: 1.1rem 1.25rem; }
  .kx-hero-coin { width: 76px; height: 76px; }
  .kx-hero-cta { grid-column: 1 / -1; align-items: stretch; }
  .kx-hero-cta p { justify-content: center; }
}

/* ---------- Shop: packages + summary ---------- */
.kx-shop { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.kx-shop-main { display: grid; gap: 1.25rem; min-width: 0; }
@media (max-width: 1060px) { .kx-shop { grid-template-columns: minmax(0, 1fr); } }

.kx-packs { padding: 1.4rem; scroll-margin-top: calc(var(--top) + 16px); }
.kx-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }

.kx-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; padding-top: .55rem; }
@media (max-width: 1240px) { .kx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1060px) { .kx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .kx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .kx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kx-pk {
  position: relative; display: flex; flex-direction: column; min-width: 0; text-align: left;
  padding: 1rem .95rem .9rem; border-radius: 14px; border: 1px solid var(--l1);
  background: linear-gradient(180deg, var(--s2), var(--s1)); color: var(--ink); cursor: pointer;
  transition: transform .2s var(--ease), border-color .15s, box-shadow .25s var(--ease), background-color .15s;
}
.kx-pk:hover { transform: translateY(-2px); border-color: var(--l3); }
.kx-pk:active { transform: scale(.98); }
.kx-pk:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.kx-pk[aria-checked="true"] {
  border-color: var(--white);
  box-shadow: 0 0 0 1px var(--white), 0 10px 40px -12px rgba(255,255,255,.28);
}
.kx-pk--best { background: linear-gradient(180deg, rgba(245,165,36,.09), rgba(245,165,36,.02) 60%, var(--s1)); border-color: var(--gold-line); }
.kx-pk--best[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 40px -12px rgba(245,165,36,.4); }

.kx-flag {
  position: absolute; top: -9px; left: .8rem; height: 19px; padding: 0 .5rem; border-radius: 6px;
  display: inline-flex; align-items: center; font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: var(--white); color: var(--on-white);
}
.kx-pk--best .kx-flag { background: var(--gold); color: #1a1003; }

.kx-check {
  position: absolute; top: .7rem; right: .7rem; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); color: var(--on-white);
  transform: scale(0); opacity: 0; transition: transform .35s var(--spring), opacity .15s;
}
.kx-check svg { width: 12px; height: 12px; }
.kx-pk--best .kx-check { background: var(--gold); color: #1a1003; }
.kx-pk[aria-checked="true"] .kx-check { transform: scale(1); opacity: 1; }

.kx-pk-amt { display: flex; align-items: baseline; gap: .3rem; margin-top: .35rem; }
.kx-pk-amt b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kx-pk-amt span { font-size: 13px; color: var(--mut); }
.kx-chip {
  align-self: flex-start; margin-top: .6rem; height: 22px; padding: 0 .5rem; border-radius: 6px;
  display: inline-flex; align-items: center; font: 500 11.5px/1 var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px var(--green-line);
}
.kx-chip--none { background: none; color: var(--faint); box-shadow: none; padding-left: 0; font-family: var(--sans); font-size: 12px; }
.kx-pk-div { height: 1px; background: var(--l1); margin: .8rem 0 .7rem; }
.kx-pk-price { font-size: 15px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kx-pk-per { margin-top: .2rem; font: 400 11.5px/1.2 var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kx-pk.is-bump { animation: kxBump .5s var(--spring); }
@keyframes kxBump { 0% { transform: scale(1); } 40% { transform: scale(1.045); } 100% { transform: scale(1); } }

.kx-note {
  margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; font-size: 13px; color: var(--ink2);
  border: 1px solid var(--l2); background: var(--s2);
}

/* ---------- Bonus ladder ---------- */
.kx-ladder { padding: 1.25rem 1.4rem 1.1rem; }
.kx-ladder-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kx-ladder-now { font-size: 15px; font-weight: 600; color: var(--ink); }
.kx-ladder-now em { font-style: normal; color: var(--green); }
.kx-ladder-from { font: 400 12px/1 var(--mono); color: var(--faint); }
.kx-track { position: relative; height: 4px; margin: 1.5rem 9px .3rem; border-radius: 99px; background: var(--l2); }
.kx-track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--white); transition: width .5s var(--ease); }
.kx-track.is-best .kx-track-fill { background: linear-gradient(90deg, var(--white) 60%, var(--gold)); }
.kx-stop { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--l3); background: var(--bg); transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--spring); padding: 0; cursor: pointer; }
.kx-stop:hover { transform: scale(1.15); }
.kx-stop.is-on { border-color: var(--white); background: var(--white); }
.kx-stop.is-gold { border-color: var(--gold-line); }
.kx-stop.is-gold.is-on { border-color: var(--gold); background: var(--gold); }
.kx-stop:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.kx-ladder-labels { position: relative; height: 34px; margin: .55rem 9px 0; }
.kx-ll { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.kx-ll:first-child { transform: translateX(-9px); text-align: left; }
.kx-ll:last-child { transform: translateX(calc(-100% + 9px)); text-align: right; }
.kx-ll b { display: block; font: 500 12px/1.2 var(--mono); color: var(--mut); font-variant-numeric: tabular-nums; }
.kx-ll span { display: block; margin-top: 2px; font: 400 11px/1.2 var(--mono); color: var(--faint); }
.kx-ll.is-on b { color: var(--ink); }
.kx-ll.is-on span { color: var(--green); }
.kx-ll.is-gold.is-on span { color: var(--gold-ink); }
@media (max-width: 640px) {
  .kx-ll:nth-child(even):not(:last-child),
  .kx-ll:nth-last-child(2) { visibility: hidden; }
}

/* ---------- Summary ---------- */
.kx-summary { position: sticky; top: calc(var(--top) + 16px); padding: 1.3rem; scroll-margin-top: calc(var(--top) + 16px); }
@media (max-width: 1060px) { .kx-summary { position: static; } }
.kx-sum-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.kx-tag {
  height: 22px; padding: 0 .55rem; border-radius: 6px; display: inline-flex; align-items: center;
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: var(--s3); color: var(--mut); box-shadow: inset 0 0 0 1px var(--l2);
}
.kx-tag--popular { background: var(--white); color: var(--on-white); box-shadow: none; }
.kx-tag--best { background: rgba(245,165,36,.12); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-line); }
.kx-get { margin-top: 1.1rem; padding: 1rem; border-radius: 14px; background: var(--field); border: 1px solid var(--l1); }
.kx-get-row { display: flex; align-items: center; gap: .6rem; margin-top: .45rem; }
.kx-get-row b { font-size: 34px; font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.kx-get-row span { font-size: 14px; color: var(--mut); }
.kx-rows { margin: 1rem 0 0; display: grid; gap: .6rem; }
.kx-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 13.5px; }
.kx-row dt { color: var(--mut); }
.kx-row dd { margin: 0; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.kx-row dd.is-green { color: var(--green); }
.kx-row dd.is-faint { color: var(--faint); font-weight: 400; }
.kx-row--total { padding-top: .8rem; margin-top: .2rem; border-top: 1px dashed var(--l3); }
.kx-row--total dt { color: var(--ink2); }
.kx-row--total dd { font-size: 15px; font-weight: 600; }

.kx-nudge {
  display: flex; align-items: center; gap: .65rem; width: 100%; margin-top: 1rem; padding: .7rem .8rem;
  border-radius: 12px; border: 1px dashed var(--green-line); background: rgba(74,222,128,.04);
  color: var(--ink2); font: 400 12.5px/1.4 var(--sans); text-align: left; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s var(--ease);
}
.kx-nudge:hover { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.45); }
.kx-nudge:active { transform: scale(.98); }
.kx-nudge b { color: var(--ink); font-weight: 600; }
.kx-nudge b.g { color: var(--green); }
.kx-nudge svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }
.kx-nudge .kx-arrow { margin-left: auto; color: var(--mut); }

.kx-consent { position: relative; display: flex; gap: .7rem; margin-top: 1rem; padding: .8rem; border-radius: 12px; border: 1px solid var(--l1); background: var(--field); cursor: pointer; font-size: 12px; line-height: 1.5; color: var(--mut); transition: border-color .15s; }
.kx-consent:hover { border-color: var(--l2); }
.kx-consent a { color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; }
.kx-consent a:hover { color: var(--white); }
.kx-consent strong { color: var(--ink2); font-weight: 500; }
.kx-consent input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; left: .8rem; top: .85rem; cursor: pointer; }
.kx-box { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--l3); background: var(--bg); display: grid; place-items: center; color: var(--on-white); transition: background-color .15s, border-color .15s; }
.kx-box svg { width: 12px; height: 12px; transform: scale(0); transition: transform .3s var(--spring); }
.kx-consent input:checked + .kx-box { background: var(--white); border-color: var(--white); }
.kx-consent input:checked + .kx-box svg { transform: scale(1); }
.kx-consent input:focus-visible + .kx-box { outline: 2px solid var(--white); outline-offset: 2px; }
.kx-consent.is-error { border-color: var(--red); }
.kx-consent.is-shake { animation: kxShake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes kxShake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }

.kx-pay { width: 100%; height: 52px; margin-top: 1rem; font-size: 15px; border-radius: 13px; }
.kx-pay .kx-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(10,10,10,.25); border-top-color: var(--on-white); animation: kxSpin .7s linear infinite; }
@keyframes kxSpin { to { transform: rotate(360deg); } }
.kx-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .75rem; font-size: 11.5px; color: var(--faint); text-align: center; }
.kx-secure svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------- Kur panaudoti ---------- */
.kx-use { margin-top: 2rem; }
.kx-use-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
@media (max-width: 1100px) { .kx-use-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kx-use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kx-tile {
  display: flex; flex-direction: column; gap: .7rem; padding: 1rem; border-radius: 14px; border: 1px solid var(--l1);
  background: linear-gradient(180deg, var(--s1), rgba(13,13,13,.7)); color: var(--ink);
  transition: transform .2s var(--ease), border-color .15s, background-color .15s;
}
.kx-tile:hover { transform: translateY(-2px); border-color: var(--l3); }
.kx-tile:active { transform: scale(.98); }
.kx-tile-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); border: 1px solid var(--l2); color: var(--ink2); }
.kx-tile-ico svg { width: 18px; height: 18px; }
.kx-tile b { font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.kx-tile b svg { width: 14px; height: 14px; color: var(--faint); transition: transform .2s var(--ease), color .15s; }
.kx-tile:hover b svg { transform: translateX(3px); color: var(--ink); }
.kx-tile span { font-size: 12.5px; color: var(--mut); line-height: 1.4; }

/* ---------- History ---------- */
.kx-history { margin-top: 2rem; overflow: hidden; }
.kx-history-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--l1); }
.kx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kx-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.kx-table th { padding: .7rem 1.4rem; text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--l1); white-space: nowrap; }
.kx-table td { padding: .85rem 1.4rem; border-bottom: 1px solid var(--l1); color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kx-table tr:last-child td { border-bottom: 0; }
.kx-table td.mono { font-size: 12.5px; color: var(--mut); }
.kx-table td.kx-amt { color: var(--ink); font-weight: 500; }
.kx-table td small { color: var(--faint); font-size: 12px; }
.kx-table th.r, .kx-table td.r { text-align: right; }
.kx-table tr.is-new td { animation: kxRowNew 2.6s var(--ease); }
@keyframes kxRowNew { 0%, 30% { background: rgba(74,222,128,.09); } 100% { background: transparent; } }
.kx-status { display: inline-flex; align-items: center; gap: .45rem; font-size: 13px; color: var(--ink2); }
.kx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.kx-status--ok::before { background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.kx-status--wait::before { background: var(--gold); box-shadow: 0 0 0 3px rgba(245,165,36,.12); }
.kx-status--err::before { background: var(--red); box-shadow: 0 0 0 3px rgba(248,113,113,.12); }
.kx-receipt { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; }
.kx-receipt:hover { color: var(--white); }
.kx-receipt svg { width: 13px; height: 13px; }
.kx-more { display: flex; justify-content: center; padding: .9rem; border-top: 1px solid var(--l1); }
.kx-empty { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; flex-wrap: wrap; }
.kx-empty-ico { width: 44px; height: 44px; border-radius: 12px; border: 1.5px dashed var(--l3); display: grid; place-items: center; color: var(--faint); flex-shrink: 0; }
.kx-empty-ico svg { width: 20px; height: 20px; }
.kx-empty-txt { flex: 1; min-width: 180px; }
.kx-empty-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.kx-empty-txt span { display: block; margin-top: .15rem; font-size: 13px; color: var(--mut); }
.kx-loading { padding: 1.2rem 1.4rem; font-size: 13px; color: var(--faint); }

.kx-legal { margin: 1.5rem auto 0; max-width: 760px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--faint); }

/* ---------- Reduced motion (page parts) ---------- */
@media (prefers-reduced-motion: reduce) {
  body.kx .kx-hero-coin img, body.kx .kx-hero-coin::after, body.kx .kx-pk, body.kx .kx-check, body.kx .kx-track-fill,
  body.kx .kx-stop, body.kx .kx-tile, body.kx .kx-tile b svg, body.kx .kx-nudge, body.kx .kx-consent, body.kx .kx-box svg,
  body.kx .kx-mbar, body.kx .kx-table tr.is-new td, body.kx .kx-pay .kx-spin {
    animation: none !important; transition: none !important;
  }
  body.kx .kx-pk:hover, body.kx .kx-tile:hover, body.kx .kx-stop:hover, body.kx .kx-pk.is-bump { transform: none; }
}
