:root {
    --bg: #07090d;
    --blue: #3b82f6;
    --blue-deep: #2563eb;
    --panel: #151b24;
    --panel-hover: #1c2430;
    --text: #ffffff;
    --muted: #8b93a1;
    --green: #22c55e;
    --danger: #ef4444;
    --glow: rgba(59, 130, 246, 0.28);
}

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

html,
body {
    height: 100%;
    min-height: 100%;
}

body {
    font-family: Inter, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

.app {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 42% 32% at 50% 30%, rgba(37, 99, 235, 0.08), transparent 70%),
        #07090d;
}

.bg-stripes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-stripes::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.09) 0px,
        rgba(255, 255, 255, 0.09) 1px,
        transparent 1px,
        transparent 16px
    );
    animation: stripeMove 8s linear infinite;
}

.particles,
.spotlight,
.vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particles {
    z-index: 0;
}

.spotlight {
    z-index: 0;
    background: radial-gradient(
        90px 90px at var(--mx, 50%) var(--my, 30%),
        rgba(59, 130, 246, 0.22),
        transparent 72%
    );
}

.vignette {
    z-index: 2;
    box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.55);
}

.topbar,
.bottombar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    flex-shrink: 0;
}

.topbar {
    justify-content: flex-start;
}

.pp-buy-bar {
    position: relative;
    z-index: 6;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 56px;
    padding: 10px 22px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pp-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #4b90f7 0%, #2f74e8 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.28);
}

.pp-buy-btn:hover,
.pp-buy-btn.is-active {
    filter: brightness(1.06);
    color: #fff;
}

.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 24px 24px;
    position: relative;
    z-index: 1;
}

.logo-wrap {
    position: relative;
    width: 248px;
    height: 248px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    animation: fadeup 0.7s ease both;
    transition: transform 0.25s ease-out;
}

.logo-inner {
    position: relative;
    width: 248px;
    height: 248px;
    animation: logoFloat 4.5s ease-in-out infinite;
}

.hero-logo {
    width: 248px;
    height: 248px;
    object-fit: contain;
    mix-blend-mode: screen;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.22));
}

.logo-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: url("../logo.png");
    mask-image: url("../logo.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    mask-mode: luminance;
    -webkit-mask-source-type: luminance;
}

.logo-shine-bar {
    position: absolute;
    inset: -30%;
    background: linear-gradient(
        115deg,
        transparent 38%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 62%
    );
    transform: translateX(-140%) skewX(-18deg);
    animation: logoShine 5.8s ease-in-out infinite;
}

.hero-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    animation: fadeup 0.7s ease 0.08s both;
}

.hero-subtitle {
    margin: 8px 0 28px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    animation: fadeup 0.7s ease 0.16s both;
}

.login-form,
.stage .btn-primary {
    width: min(380px, 100%);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeup 0.7s ease 0.24s both;
}

.field {
    position: relative;
    display: block;
}

.field svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.field input {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    font: 500 14px/1 Inter, "Segoe UI", sans-serif;
    padding: 0 16px 0 42px;
    outline: none;
}

.field input::placeholder {
    color: #6b7380;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.form-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    padding: 10px 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #4b90f7 0%, #2f74e8 100%);
    color: #fff;
    font: 700 13px/1 Inter, "Segoe UI", sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 28px var(--glow);
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
    transform: translateX(-130%);
}

.btn-primary:hover::after {
    animation: btnShine 0.7s ease;
}

.btn-primary svg {
    width: 14px;
    height: 14px;
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-primary:active {
    transform: translateY(1px);
}

.link-row {
    width: min(380px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    animation: fadeup 0.7s ease 0.32s both;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    border-radius: 10px;
    background: var(--panel);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-secondary svg {
    width: 14px;
    height: 14px;
}

.btn-secondary:hover {
    background: var(--panel-hover);
}

.welcome {
    margin: 8px 0 6px;
    color: var(--muted);
    font-size: 15px;
}

.welcome strong {
    color: #fff;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 22px;
}

.bottombar {
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    position: relative;
    z-index: 3;
}

.copyright {
    letter-spacing: 0.12em;
    opacity: 0.78;
}

@keyframes fadein {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes stripeMove {
    from { transform: translate(0, 0); }
    to { transform: translate(-320px, 320px); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes logoShine {
    0%, 58% { transform: translateX(-140%) skewX(-18deg); }
    78%, 100% { transform: translateX(140%) skewX(-18deg); }
}

@keyframes btnShine {
    to { transform: translateX(130%); }
}

@media (max-width: 520px) {
    .link-row {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 15px;
        letter-spacing: 0.14em;
    }

    .bottombar {
        flex-direction: column;
        gap: 6px;
        height: auto;
        padding: 16px 20px 20px;
        text-align: center;
    }
}
