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

body {
    background-color: wheat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-header {
    font-family: "JetBrains Mono", monospace;
    font-size: 50px;
}

.text-below {
    font-family: "JetBrains Mono", monospace;
    font-size: 20px;
}

/* ===== Animowany kąt gradientu ===== */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin {
    to { --angle: 360deg; }
}

@keyframes float-sparkle {
    0%   { transform: translateY(0) scale(0);   opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

/* ===== Przycisk ===== */
.mega-btn {
    --c1: #ff3cac;
    --c2: #784ba0;
    --c3: #2b86c5;
    --c4: #00f5d4;

    margin: auto 0;

    position: relative;
    display: flex;
    padding: 3px;                       /* grubość świecącej ramki */
    border: none;
    border-radius: 999px;
    background: conic-gradient(from var(--angle), var(--c1), var(--c2), var(--c3), var(--c4), var(--c1));
    animation: spin 4s linear infinite;
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Poświata pod przyciskiem */
.mega-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    filter: blur(22px);
    opacity: 0.55;
    z-index: -1;
    transition: opacity 0.35s, filter 0.35s;
}

.mega-btn:hover {
    transform: translateY(-4px) scale(1.04);
    animation-duration: 1.5s;           /* ramka kręci się szybciej */
}

.mega-btn:hover::before {
    opacity: 0.95;
    filter: blur(32px);
}

.mega-btn:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
}

.mega-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 6px;
}

/* Wnętrze przycisku */
.mega-btn__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 42px;
    border-radius: inherit;
    background:
            radial-gradient(120% 120% at 50% 0%, #2a1f4d 0%, #0e0b1d 60%);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Błysk przelatujący po najechaniu */
.mega-btn__inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-150%) skewX(-20deg);
    transition: transform 0.8s ease;
}

.mega-btn:hover .mega-btn__inner::before {
    transform: translateX(250%) skewX(-20deg);
}

/* Tekst z gradientem */
.mega-btn__text {
    position: relative;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #ffd6f2, #c9f9ff, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: background-position 0.8s ease;
}

.mega-btn:hover .mega-btn__text {
    background-position: 100% center;
}

/* Ikona strzałki */
.mega-btn__icon {
    position: relative;
    width: 22px;
    height: 22px;
    color: var(--c4);
    filter: drop-shadow(0 0 6px var(--c4));
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mega-btn:hover .mega-btn__icon {
    transform: translateX(6px);
}

/* Iskierki */
.mega-btn__sparkle {
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px 2px var(--c1);
    opacity: 0;
    pointer-events: none;
}

.mega-btn__sparkle:nth-child(1) { left: 18%; box-shadow: 0 0 8px 2px var(--c1); }
.mega-btn__sparkle:nth-child(2) { left: 38%; box-shadow: 0 0 8px 2px var(--c4); }
.mega-btn__sparkle:nth-child(3) { left: 62%; box-shadow: 0 0 8px 2px var(--c3); }
.mega-btn__sparkle:nth-child(4) { left: 82%; box-shadow: 0 0 8px 2px var(--c1); }

.mega-btn:hover .mega-btn__sparkle {
    animation: float-sparkle 1.4s ease-out infinite;
}

.mega-btn:hover .mega-btn__sparkle:nth-child(2) { animation-delay: 0.35s; }
.mega-btn:hover .mega-btn__sparkle:nth-child(3) { animation-delay: 0.7s; }
.mega-btn:hover .mega-btn__sparkle:nth-child(4) { animation-delay: 1.05s; }

/* Dostępność: mniej ruchu */
@media (prefers-reduced-motion: reduce) {
    .mega-btn,
    .mega-btn:hover .mega-btn__sparkle { animation: none; }
    .mega-btn,
    .mega-btn__inner::before,
    .mega-btn__icon { transition: none; }
}