/* Nyári Küldetés Ultra */

.nku-game {
    --ink: #10213a;
    --cyan: #10d7ff;
    --blue: #1877ff;
    --yellow: #ffd166;
    --orange: #ff9f1c;
    --pink: #ff3f8e;
    --green: #2ee6a6;
    --glass: rgba(255,255,255,.18);
    position: relative;
    width: min(100%, 1180px);
    height: min(82vh, 760px);
    min-height: 650px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 38px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,209,102,.55), transparent 22%),
        radial-gradient(circle at 82% 12%, rgba(255,63,142,.38), transparent 24%),
        radial-gradient(circle at 55% 70%, rgba(46,230,166,.34), transparent 26%),
        linear-gradient(180deg, #36d7ff 0%, #7ee9ff 42%, #ffe9a9 73%, #ffc078 100%);
    box-shadow:
        0 32px 90px rgba(16,33,58,.22),
        inset 0 0 0 1px rgba(255,255,255,.45);
    isolation: isolate;
    font-family: inherit;
    color: var(--ink);
}

.nku-game * {
    box-sizing: border-box;
}

.nku-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.nku-noise {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: .18;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,.8) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,.8) 0 1px, transparent 1.5px);
    background-size: 34px 34px, 48px 48px;
    mix-blend-mode: soft-light;
}

.nku-scan {
    position: absolute;
    inset: -120%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 45%, rgba(255,255,255,.32) 49%, transparent 54%);
    animation: nkuScan 7s linear infinite;
    opacity: .45;
}

.nku-hud {
    position: absolute;
    z-index: 8;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
    gap: 10px;
    width: min(92%, 700px);
    pointer-events: none;
}

.nku-hud-card {
    padding: 10px 13px;
    border-radius: 22px;
    background: rgba(255,255,255,.26);
    border: 1px solid rgba(255,255,255,.54);
    box-shadow:
        0 14px 32px rgba(16,33,58,.13),
        inset 0 1px 0 rgba(255,255,255,.42);
    backdrop-filter: blur(18px) saturate(1.35);
    text-align: center;
}

.nku-hud-card span {
    display: block;
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    color: rgba(16,33,58,.72);
}

.nku-hud-card strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    line-height: 1;
    color: #08395c;
    text-shadow: 0 2px 0 rgba(255,255,255,.4);
}

.nku-energy-bar {
    position: absolute;
    z-index: 8;
    left: 50%;
    transform: translateX(-50%);
    top: 88px;
    width: min(86%, 620px);
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,.28);
    border: 1px solid rgba(255,255,255,.45);
    box-shadow: inset 0 2px 10px rgba(16,33,58,.13);
}

.nku-energy-fill {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--cyan), var(--yellow), var(--pink));
    box-shadow: 0 0 22px rgba(16,215,255,.75);
    transition: width .18s ease;
}

.nku-toast {
    position: absolute;
    z-index: 12;
    left: 50%;
    top: 116px;
    transform: translateX(-50%);
    min-height: 32px;
    pointer-events: none;
    display: grid;
    place-items: center;
}

.nku-toast span {
    display: inline-flex;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    border: 1px solid rgba(255,255,255,.6);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(16,33,58,.16);
    font-weight: 1000;
    animation: nkuToast .95s ease forwards;
}

.nku-panel {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 32%, rgba(255,255,255,.32), transparent 34%),
        rgba(16,33,58,.06);
    backdrop-filter: blur(7px);
}

.nku-panel[hidden] {
    display: none;
}

.nku-card {
    position: relative;
    width: min(95%, 780px);
    padding: clamp(28px, 4.6vw, 54px);
    border-radius: 40px;
    overflow: hidden;
    text-align: center;
    background:
        linear-gradient(145deg, rgba(255,255,255,.52), rgba(255,255,255,.2));
    border: 1px solid rgba(255,255,255,.62);
    box-shadow:
        0 34px 95px rgba(16,33,58,.24),
        inset 0 1px 0 rgba(255,255,255,.7);
    backdrop-filter: blur(24px) saturate(1.55);
}

.nku-card:before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(16,215,255,.72), rgba(255,63,142,.52), rgba(255,209,102,.78));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.nku-card-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    left: 50%;
    top: -170px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,.7), rgba(16,215,255,.34), transparent 68%);
    filter: blur(6px);
    animation: nkuGlow 3.2s ease-in-out infinite;
}

.nku-card > *:not(.nku-card-glow) {
    position: relative;
    z-index: 1;
}

.nku-kicker {
    display: inline-flex;
    padding: 8px 15px;
    border-radius: 999px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #07445d;
    background: rgba(255,255,255,.36);
    border: 1px solid rgba(255,255,255,.46);
}

.nku-card h2 {
    margin: 0 0 14px;
    font-size: clamp(48px, 8vw, 98px);
    line-height: .88;
    letter-spacing: -.05em;
    color: #0d2c4a;
    text-shadow:
        0 2px 0 rgba(255,255,255,.75),
        0 14px 38px rgba(16,33,58,.16);
}

.nku-card p {
    max-width: 650px;
    margin: 0 auto 26px;
    font-size: clamp(16px, 2.1vw, 21px);
    line-height: 1.48;
    font-weight: 700;
    color: rgba(16,33,58,.82);
}

.nku-icons {
    display: grid;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 12px;
    max-width: 680px;
    margin: 24px auto 30px;
}

.nku-icons div {
    min-height: 112px;
    padding: 14px 10px;
    border-radius: 28px;
    background: rgba(255,255,255,.26);
    border: 1px solid rgba(255,255,255,.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
    display: grid;
    place-items: center;
    gap: 4px;
    transition: transform .18s ease, background .18s ease;
}

.nku-icons div:hover {
    transform: translateY(-4px) rotate(-1deg);
    background: rgba(255,255,255,.36);
}

.nku-icons b {
    font-size: 38px;
    line-height: 1;
    filter: drop-shadow(0 8px 14px rgba(16,33,58,.12));
}

.nku-icons span {
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(16,33,58,.72);
}

.nku-start,
.nku-restart {
    position: relative;
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 17px 36px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 1000;
    color: #201000;
    background: linear-gradient(135deg, #fff1a6, #ffd166 35%, #ff9f1c 72%, #ff7b00);
    box-shadow:
        0 18px 40px rgba(255,159,28,.38),
        0 0 0 7px rgba(255,255,255,.18),
        inset 0 1px 0 rgba(255,255,255,.7);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.nku-start:before,
.nku-restart:before {
    content: "";
    position: absolute;
    inset: -50%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,.72), transparent);
    transform: translateX(-70%);
    animation: nkuButtonShine 2.4s linear infinite;
}

.nku-start:hover,
.nku-restart:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        0 24px 48px rgba(255,159,28,.48),
        0 0 0 9px rgba(255,255,255,.20);
}

.nku-close {
    position: absolute;
    top: 17px;
    right: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255,255,255,.32);
    color: #10213a;
    font-size: 30px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}

.nku-result-card {
    width: min(95%, 580px);
}

.nku-result-card h3 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5.5vw, 62px);
    line-height: .95;
    letter-spacing: -.04em;
}

.nku-medal {
    font-size: 84px;
    margin-bottom: 10px;
    animation: nkuMedal 1.2s ease-in-out infinite;
}

.nku-result-card p {
    margin-bottom: 10px;
    font-size: 22px;
}

.nku-rank {
    margin-bottom: 26px !important;
    color: #07445d !important;
}

.nku-game.nku-running .nku-start-panel {
    display: none;
}

.nku-game.nku-hidden {
    display: none;
}

.nku-game.nku-ultra {
    animation: nkuUltraPulse .75s ease-in-out infinite alternate;
}

@keyframes nkuScan {
    from { transform: translateX(-30%) translateY(-30%); }
    to { transform: translateX(30%) translateY(30%); }
}

@keyframes nkuToast {
    0% { opacity: 0; transform: translateY(12px) scale(.9); }
    18% { opacity: 1; transform: translateY(0) scale(1.03); }
    78% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-14px) scale(.96); }
}

@keyframes nkuGlow {
    0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.12); }
}

@keyframes nkuButtonShine {
    to { transform: translateX(70%); }
}

@keyframes nkuMedal {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-8px); }
}

@keyframes nkuUltraPulse {
    from { filter: saturate(1.05) brightness(1); }
    to { filter: saturate(1.3) brightness(1.05); }
}

@media (max-width: 790px) {
    .nku-game {
        min-height: 680px;
        height: 82vh;
        border-radius: 26px;
    }

    .nku-hud {
        top: 10px;
        grid-template-columns: repeat(2, 1fr);
        width: min(94%, 430px);
        gap: 7px;
    }

    .nku-hud-card {
        padding: 8px 10px;
        border-radius: 18px;
    }

    .nku-hud-card strong {
        font-size: 18px;
    }

    .nku-energy-bar {
        top: 104px;
    }

    .nku-toast {
        top: 128px;
    }

    .nku-card {
        border-radius: 30px;
        padding: 26px 18px;
    }

    .nku-card h2 {
        font-size: 50px;
    }

    .nku-card p {
        font-size: 15px;
    }

    .nku-icons {
        grid-template-columns: repeat(2, 1fr);
    }

    .nku-icons div {
        min-height: 82px;
        border-radius: 20px;
    }

    .nku-icons b {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nku-game *,
    .nku-game *:before,
    .nku-game *:after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
