/* linku.hu – modern dark UI */
:root {
    --bg: #07070f;
    --card: rgba(255, 255, 255, 0.05);
    --card-brd: rgba(255, 255, 255, 0.09);
    --txt: #eef0f8;
    --muted: #9aa0b5;
    --acc1: #7c5cff;
    --acc2: #22d3ee;
    --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
    --radius: 20px;
    --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- háttér --- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: drift 18s ease-in-out infinite alternate;
}
.orb1 { width: 46vw; height: 46vw; left: -12vw; top: -18vw; background: #5b3df0; }
.orb2 { width: 38vw; height: 38vw; right: -10vw; top: 12vh; background: #0e7490; animation-delay: -6s; }
.orb3 { width: 30vw; height: 30vw; left: 32vw; bottom: -22vw; background: #7c5cff; opacity: 0.32; animation-delay: -11s; }
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(6vw, 4vh) scale(1.12); }
}
.grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* --- fejléc --- */
.top {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 960px; margin: 0 auto; padding: 22px 24px;
}
.logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
    color: var(--txt); text-decoration: none;
}
.logo svg { color: var(--acc2); }
.logo span { color: var(--acc2); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 0.92rem; }
.nav > a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav > a:hover { color: var(--txt); }
.langsw {
    display: inline-flex; border: 1px solid var(--card-brd);
    border-radius: 999px; padding: 2px; background: var(--card);
}
.langsw a {
    padding: 3px 11px; border-radius: 999px; font-size: 0.8rem;
    font-weight: 600; color: var(--muted); text-decoration: none;
}
.langsw a.on { background: var(--grad); color: #fff; }

/* --- hero --- */
main { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.hero { text-align: center; padding: 7vh 0 5vh; user-select: none; }
.hero h1 {
    font-size: clamp(2.4rem, 6.5vw, 4.2rem);
    font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
}
.hero h1 em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .sub { margin-top: 18px; color: var(--muted); font-size: 1.08rem; }

/* --- linku, a kis láncszem-állatka --- */
.linku-wrap { animation: lk-drop 0.8s cubic-bezier(0.25, 1.4, 0.4, 1) both; }
@keyframes lk-drop {
    from { transform: translateY(-46px) scale(0.6); opacity: 0; }
    60%  { opacity: 1; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.linku {
    display: block; width: 110px; height: auto;
    margin: 0 auto 8px;
    transform-origin: 50% 90%;
    animation: lk-bob 3.6s ease-in-out 0.8s infinite;
    cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.linku.lk-jump { animation: lk-hop 0.55s ease-in-out infinite; }
@keyframes lk-hop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    45%      { transform: translateY(-16px) scale(0.96, 1.06); }
    70%      { transform: translateY(0) scale(1.08, 0.88); }
}
.linku.lk-yay { animation: lk-yay 0.9s ease; }
@keyframes lk-yay {
    0%   { transform: translateY(0) rotate(0); }
    30%  { transform: translateY(-20px) rotate(-12deg); }
    60%  { transform: translateY(-14px) rotate(12deg); }
    100% { transform: translateY(0) rotate(0); }
}
.linku.lk-no { animation: lk-no 0.45s ease; }
@keyframes lk-no {
    0%, 100% { transform: translateX(0) rotate(0); }
    25%      { transform: translateX(-9px) rotate(-9deg); }
    70%      { transform: translateX(9px) rotate(7deg); }
}
@keyframes lk-bob {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50%      { transform: translateY(-12px) rotate(5deg); }
}
.lk-eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: lk-blink 4.8s infinite;
}
@keyframes lk-blink {
    0%, 91%, 100% { transform: scaleY(1); }
    94.5%         { transform: scaleY(0.1); }
}
.lk-pup { animation: lk-look 7s ease-in-out infinite; }
@keyframes lk-look {
    0%, 62%, 100% { transform: translateX(0); }
    72%, 88%      { transform: translateX(3.5px); }
    80%           { transform: translateX(-3px); }
}
.linku-sad { width: 84px; animation-duration: 5.5s; margin: 18px auto 0; }
.linku-mini { width: 34px; margin: 0; }
.admbrand { display: inline-flex; align-items: center; gap: 10px; }

/* --- kattintás-trükkök --- */
.linku.lk-flip { animation: lk-flip 0.7s cubic-bezier(0.3, 1.5, 0.4, 1); }
@keyframes lk-flip {
    0%   { transform: translateY(0) rotate(0) scale(1); }
    35%  { transform: translateY(-26px) rotate(180deg) scale(1.05); }
    70%  { transform: translateY(0) rotate(340deg) scale(1.12, 0.84); }
    100% { transform: translateY(0) rotate(360deg) scale(1); }
}
.linku.lk-roll { animation: lk-roll 0.65s ease-in-out; }
@keyframes lk-roll {
    0%   { transform: translateX(0) rotate(0); }
    30%  { transform: translateX(-16px) rotate(-18deg) scale(0.95, 1.05); }
    65%  { transform: translateX(16px) rotate(15deg); }
    100% { transform: translateX(0) rotate(0); }
}
.linku.lk-squeeze { animation: lk-squeeze 0.6s ease; }
@keyframes lk-squeeze {
    0%, 100% { transform: scale(1, 1); }
    30%      { transform: scale(0.78, 1.18) translateY(-10px); }
    60%      { transform: scale(1.14, 0.8); }
    80%      { transform: scale(0.96, 1.06); }
}

/* --- szikrák kattintáskor --- */
.lk-spark {
    position: fixed; width: 7px; height: 7px; border-radius: 50%;
    pointer-events: none; z-index: 60;
    transform: translate(-50%, -50%);
    animation: lk-spark 0.7s ease-out forwards;
}
@keyframes lk-spark {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.15); opacity: 0; }
}

/* --- kártya / űrlap --- */
.card {
    background: var(--card);
    border: 1px solid var(--card-brd);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    padding: 26px;
}
.urlrow { display: flex; gap: 10px; }
.urlrow input {
    flex: 1; min-width: 0;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-brd);
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 1rem; color: var(--txt);
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.urlrow input:focus {
    border-color: var(--acc1);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22);
}
.urlrow input::placeholder { color: #5d6378; }
.urlrow button, #copybtn, #sharebtn, #statscopy {
    border: 0; border-radius: 14px;
    background: var(--grad);
    color: #fff; font-weight: 700; font-size: 1rem;
    padding: 15px 26px; cursor: pointer;
    transition: transform 0.12s, filter 0.15s;
    white-space: nowrap;
}
.urlrow button:hover, #copybtn:hover, #sharebtn:hover, #statscopy:hover { filter: brightness(1.12); transform: translateY(-1px); }
.urlrow button:active, #copybtn:active, #sharebtn:active, #statscopy:active { transform: translateY(0); }
.urlrow button:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* --- opciók --- */
.opts { margin-top: 14px; }
.opts summary {
    cursor: pointer; list-style: none;
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--muted); font-size: 0.9rem; font-weight: 600;
    padding: 4px 2px; user-select: none;
}
.opts summary::-webkit-details-marker { display: none; }
.chev {
    width: 8px; height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-bottom: 2px;
}
.opts[open] .chev { transform: rotate(-135deg); margin-bottom: -2px; }
.optsgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}
.opt { display: flex; flex-direction: column; gap: 8px; }
.lbl { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.lbl small { font-weight: 400; opacity: 0.75; }
.aliaswrap {
    display: flex; align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-brd);
    border-radius: 12px; overflow: hidden;
}
.aliaswrap .prefix {
    padding: 0 4px 0 12px; color: #5d6378; font-size: 0.92rem;
    white-space: nowrap;
}
.aliaswrap input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: none;
    padding: 11px 12px 11px 0;
    color: var(--txt); font-size: 0.95rem;
}
.aliaswrap:focus-within { border-color: var(--acc1); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.22); }

.opt select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-brd);
    border-radius: 12px;
    padding: 11px 12px; color: var(--txt); font-size: 0.95rem;
    outline: none;
}
.opt select:focus { border-color: var(--acc1); }
.seg { display: flex; gap: 8px; }
.seg.off { opacity: 0.45; pointer-events: none; }
.segbtn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border-radius: 12px;
    border: 1px solid var(--card-brd);
    font: inherit; font-size: 0.88rem; color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.segbtn:hover { color: var(--txt); }
.segbtn.on { color: var(--txt); border-color: var(--acc1); background: rgba(124, 92, 255, 0.14); }

/* --- eredmény --- */
.result { margin-top: 22px; border-top: 1px dashed var(--card-brd); padding-top: 20px; }
.ready { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.resrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#shortlink {
    font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em;
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-decoration: none; word-break: break-all;
}
#shortlink:hover { text-decoration: underline; }
#copybtn, #sharebtn, #statscopy { padding: 10px 20px; font-size: 0.92rem; }
.ghostbtn {
    padding: 10px 18px; border-radius: 14px;
    border: 1px solid var(--card-brd);
    color: var(--txt); text-decoration: none;
    font-size: 0.92rem; font-weight: 600;
    transition: background 0.15s;
    display: inline-block;
}
.ghostbtn:hover { background: rgba(255, 255, 255, 0.07); }
.expinfo { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }
.statsrow { margin-top: 14px; }
.statslbl { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
#statslink { color: var(--acc2); font-weight: 600; text-decoration: none; word-break: break-all; }
#statslink:hover { text-decoration: underline; }
.linkqr { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.linkqr .qrimg img {
    display: block; width: 128px; height: 128px;
    border-radius: 12px; background: #fff;
}
.qrside { display: flex; flex-direction: column; gap: 8px; }
.qrt { color: var(--muted); font-size: 0.85rem; }

.err {
    margin-top: 16px; color: #ff8f8f; font-size: 0.92rem;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.25);
    padding: 10px 14px; border-radius: 12px;
}

/* --- feature kártyák --- */
.features {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin: 42px 0;
}
.feat {
    background: var(--card); border: 1px solid var(--card-brd);
    border-radius: 16px; padding: 20px;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.feat h3 { font-size: 1rem; margin-bottom: 7px; }
.feat p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

/* --- támogatás --- */
.support { padding: 10px 0 60px; }
.supcard {
    max-width: 880px; margin: 0 auto;
    background: var(--card);
    border: 1px solid rgba(124, 92, 255, 0.45);
    border-radius: var(--radius); padding: 30px 34px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(124, 92, 255, 0.12);
    text-align: center;
}
.supcard h2 {
    font-size: 1.5rem; letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--acc), var(--acc2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.supgrid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 26px; margin-top: 20px;
}
.supcol h3 { font-size: 0.95rem; color: var(--acc2); margin-bottom: 10px; }
.supqrimg {
    display: block; width: 160px; height: 160px;
    margin: 12px auto 6px; border-radius: 12px;
    background: #fff; color: #07070f;
}
.supd { color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin: 10px 0; }
.supd.small { font-size: 0.8rem; }
.amtseg { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; }
.qrbox { margin: 16px 0 6px; text-align: center; }
.ibancopy {
    background: none; border: none; padding: 0;
    font: inherit; cursor: pointer;
}
.ibancopy code {
    color: var(--acc2); font-size: 0.8rem;
    border-bottom: 1px dashed var(--card-brd);
    padding-bottom: 1px;
}
.ibancopy:hover code { border-color: var(--acc2); }
.qrbox img { width: 160px; height: 160px; border-radius: 12px; }
.donatebtn {
    display: inline-block; margin-top: 4px;
    padding: 11px 22px; border-radius: 14px;
    background: var(--grad); color: #fff;
    font-weight: 700; font-size: 0.95rem; text-decoration: none;
    transition: filter 0.15s, transform 0.12s;
}
.donatebtn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.bankinfo { font-size: 0.85rem; color: var(--muted); margin-top: 8px; word-break: break-all; }
.bankinfo code { color: var(--acc2); font-size: 0.8rem; }

/* --- lábléc / toast / hibaoldal --- */
.counters { margin-top: 16px; color: var(--muted); font-size: 0.92rem; }
.counters b { color: var(--txt); }
footer { text-align: center; padding: 30px 20px 40px; color: var(--muted); font-size: 0.85rem; }
.visitors { margin-top: 8px; font-size: 0.78rem; opacity: 0.75; }
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
    background: #14141f; border: 1px solid var(--card-brd);
    color: var(--txt); font-size: 0.92rem; font-weight: 600;
    padding: 12px 22px; border-radius: 999px;
    box-shadow: var(--shadow);
    animation: pop 0.25s ease;
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

.errpage { display: flex; flex-direction: column; min-height: 100vh; }
.errcard { max-width: 440px; margin: auto; text-align: center; }
.errcard h1 { font-size: 1.6rem; margin: 22px 0 10px; }
.errcard p { color: var(--muted); margin-bottom: 22px; }
.errcard .logo { justify-content: center; }
.statcode { font-weight: 700; word-break: break-all; color: var(--acc2); }
.statlist { text-align: left; margin: 18px 0 22px; }
.statlist dt {
    font-size: 0.72rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.07em; margin-top: 12px;
}
.statlist dd { font-size: 0.95rem; margin-top: 3px; word-break: break-all; }
.statlist dd a { color: var(--acc2); text-decoration: none; }
.statlist dd a:hover { text-decoration: underline; }
.statlist dd.big { font-size: 1.6rem; font-weight: 800; }

/* --- admin --- */
.adm { padding-bottom: 60px; }
.admgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 20px; }
.admstat { padding: 18px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.admstat span { display: block; font-size: 1.7rem; font-weight: 800; color: var(--txt); margin-bottom: 4px; }
.admhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.admhead h2 { font-size: 1.1rem; }
.admhead small { color: var(--muted); font-weight: 400; }
.admtable { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admtable th {
    text-align: left; color: var(--muted); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.07em; padding: 6px 8px;
}
.admtable td { padding: 8px; border-top: 1px solid var(--card-brd); vertical-align: middle; }
.admtable tr.expd td { opacity: 0.45; }
.admtable td.nowrap { white-space: nowrap; }
.admtable td.url {
    max-width: 280px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.admtable a { color: var(--acc2); text-decoration: none; }
.admtable a:hover { text-decoration: underline; }
.delbtn {
    background: none; border: 1px solid var(--card-brd);
    color: #ff8f8f; border-radius: 8px; padding: 4px 9px;
    cursor: pointer; font-size: 0.8rem;
}
.delbtn:hover { border-color: rgba(255, 80, 80, 0.5); }
.admset { margin-bottom: 14px; }
.donset { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.chk {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--muted); font-size: 0.9rem; cursor: pointer;
}
.chk input { width: 16px; height: 16px; accent-color: var(--acc1); cursor: pointer; }

/* --- admin statisztika / biztonság --- */
.chart { display: flex; flex-direction: column; gap: 6px; }
.chartrow {
    display: grid; grid-template-columns: 52px 1fr 1fr 110px;
    gap: 10px; align-items: center;
    font-size: 0.78rem; color: var(--muted);
}
.chbar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.chbar i { display: block; height: 100%; border-radius: 99px; }
.chbar .b1 { background: var(--acc1); }
.chbar .b2 { background: var(--acc2); }
.chday { white-space: nowrap; }
.chnum { text-align: right; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 10px; }
.dot.b1 { background: var(--acc1); }
.dot.b2 { background: var(--acc2); }
.seccheck {
    display: flex; gap: 10px; padding: 9px 0;
    border-top: 1px solid var(--card-brd);
    font-size: 0.85rem; color: var(--muted);
}
.seccheck:first-of-type { border-top: 0; }
.seccheck > b { flex-shrink: 0; }
.seccheck.ok > b { color: #4ade80; }
.seccheck.bad > b { color: #ff8f8f; }
.waflog {
    background: rgba(0, 0, 0, 0.35); border: 1px solid var(--card-brd);
    border-radius: 12px; padding: 14px;
    font-size: 0.75rem; line-height: 1.5; color: var(--muted);
    max-height: 280px; overflow: auto;
    white-space: pre-wrap; word-break: break-all;
}

/* --- reszponzív --- */
@media (max-width: 640px) {
    .urlrow { flex-direction: column; }
    .urlrow button { padding: 14px; }
    .optsgrid, .features { grid-template-columns: 1fr; }
    .admgrid { grid-template-columns: repeat(2, 1fr); }
    .admtable td.url { max-width: 120px; }
    .supcard { padding: 24px; }
    .supgrid { grid-template-columns: 1fr; }
    .hero { padding-top: 4vh; }
}

@media (prefers-reduced-motion: reduce) {
    .orb, .linku, .linku-wrap, .lk-eyes, .lk-pup, .lk-spark { animation: none; }
    html { scroll-behavior: auto; }
}
