:root {
    --bg: #070812;
    --bg-2: #0d1020;
    --card: rgba(18, 21, 40, 0.72);

    --primary: #8b5cf6;
    --primary-2: #6366f1;
    --accent: #ec4899;
    --cyan: #22d3ee;

    --text: #f8fafc;
    --muted: #9ca3af;
    --border: rgba(255,255,255,.10);

    --shadow:
        0 30px 80px rgba(0,0,0,.45),
        0 0 80px rgba(124,58,237,.10);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(99,102,241,.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 75%,
            rgba(236,72,153,.14),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            var(--bg),
            var(--bg-2)
        );
}

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    animation: floatGlow 10s ease-in-out infinite;
}

.glow-1 {
    width: 280px;
    height: 280px;
    top: -100px;
    left: -80px;
    background: #7c3aed;
}

.glow-2 {
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -70px;
    background: #db2777;
    animation-delay: -4s;
}

.glow-3 {
    width: 180px;
    height: 180px;
    right: 22%;
    top: 12%;
    background: #0891b2;
    opacity: .15;
    animation-delay: -7s;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate3d(0,0,0) scale(1);
    }

    50% {
        transform: translate3d(20px,-20px,0) scale(1.08);
    }
}

.sound-wave {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(900px, 90vw);
    height: 240px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: .13;
    z-index: 1;
}

.background-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -45%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: .08;
    z-index: 0;
}

.background-logo .custom-logo,
.background-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 600px) {
    .background-logo {
        width: 140px;
        height: 140px;
        transform: translate(-50%, -50%);
    }
}

.bar {
    width: 4px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(
        to top,
        var(--primary),
        var(--accent),
        var(--cyan)
    );
    animation: sound 1.2s ease-in-out infinite;
}

.bar:nth-child(2n) {
    animation-delay: -.2s;
}

.bar:nth-child(3n) {
    animation-delay: -.4s;
}

.bar:nth-child(4n) {
    animation-delay: -.7s;
}

@keyframes sound {
    0%, 100% {
        height: 20px;
    }

    50% {
        height: 100px;
    }
}

.login-page {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 42px;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.07),
            rgba(255,255,255,.025)
        );
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
    animation: cardIn .75s cubic-bezier(.2,.8,.2,1);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(139,92,246,.10),
            transparent 40%,
            rgba(236,72,153,.06)
        );
    pointer-events: none;
}

.brand {
    position: relative;
    text-align: center;
    margin-bottom: 32px;
}

.logo img {
    position: relative;
    border-radius: 32px;
}

.brand-icon {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );
    box-shadow:
        0 15px 40px rgba(139,92,246,.35),
        0 0 35px rgba(236,72,153,.15);
    animation: iconPulse 3s ease-in-out infinite;
}

.brand-icon a,
.brand-icon .brand-logo-fallback,
.brand-icon .custom-logo {
    display: flex;
    width: auto;
    max-width: 60%;
    max-height: 60%;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brand-icon img,
.brand-icon .custom-logo {
    width: auto;
    max-width: 75%;
    max-height: 75%;
    border-radius: 0;
    object-fit: contain;
}

.brand-icon .brand-logo-fallback {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    padding: 0 8px;
}

.brand-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    border: 1px solid rgba(139,92,246,.25);
    animation: ring 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes ring {
    0%, 100% {
        opacity: .3;
        transform: scale(1);
    }

    50% {
        opacity: .8;
        transform: scale(1.08);
    }
}

.brand-icon svg,
.brand-icon img {
    width: 34px;
    height: 34px;
    color: white;
    object-fit: contain;
}

.brand h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.brand h1 span {
    background:
        linear-gradient(
            90deg,
            #a78bfa,
            #f472b6
        );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(34,211,238,.07);
    border: 1px solid rgba(34,211,238,.14);
    color: #67e8f9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.live-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22d3ee;
}

.live-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid #22d3ee;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% {
        opacity: .8;
        transform: scale(.8);
    }

    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d1d5db;
    font-size: 12px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    transition: color .2s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #a78bfa;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 15px 0 44px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;
    outline: none;
    color: white;
    background: rgba(0,0,0,.20);
    font: inherit;
    font-size: 13px;
    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.form-input::placeholder {
    color: #626978;
}

.form-input:focus {
    border-color: rgba(139,92,246,.7);
    background: rgba(0,0,0,.28);
    box-shadow:
        0 0 0 4px rgba(139,92,246,.09);
}

.password-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    color: #6b7280;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: #c4b5fd;
    background: rgba(255,255,255,.05);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 2px 0 22px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 11px;
    cursor: pointer;
}

.remember input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot {
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.forgot:hover {
    color: #c4b5fd;
}

.login-button {
    position: relative;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    color: white;
    background:
        linear-gradient(
            100deg,
            #7c3aed,
            #8b5cf6,
            #ec4899
        );
    background-size: 200% 100%;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow:
        0 12px 30px rgba(124,58,237,.25);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow:
        0 16px 35px rgba(124,58,237,.35);
}

.login-button:active {
    transform: translateY(0);
}

.login-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.25),
            transparent
        );
    transform: skewX(-20deg);
    animation: shine 3.5s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    35%, 100% {
        left: 150%;
    }
}

.button-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: #525968;
    font-size: 10px;
    line-height: 1.6;
}

.login-footer strong {
    color: #7c8190;
}

.form-errors {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(244,63,94,.12);
    color: #fee2e2;
    border: 1px solid rgba(248,113,113,.2);
}

.form-errors p {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    body {
        overflow: auto;
    }

    .login-page {
        min-height: 100svh;
        padding: 20px 15px;
    }

    .login-card {
        max-width: 430px;
        padding: 30px 22px;
        border-radius: 22px;
    }

    .brand {
        margin-bottom: 26px;
    }

    .brand-icon {
        width: 62px;
        height: 62px;
        border-radius: 19px;
    }

    .brand h1 {
        font-size: 24px;
    }

    .sound-wave {
        opacity: .07;
    }

    .form-options {
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 26px 18px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
.back-home {
    display: block;
    margin-top: 14px;
    text-align: center;
    color: var(--muted-fg);
    font-size: 13px;
    text-decoration: none;
    transition: color .2s ease;
}

.back-home:hover {
    color: var(--primary);
}
/* =========================================
   LOGIN SUCCESS
   ========================================= */

.login-success {
    position: relative;
    z-index: 10;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: successAppear .5s cubic-bezier(.2,.8,.2,1) both;
}

.success-burst {
    position: relative;
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--accent)
    );
    box-shadow:
        0 12px 35px rgba(139,92,246,.35),
        0 0 45px rgba(236,72,153,.18);
    animation: successPop .7s cubic-bezier(.2,1.4,.4,1) both;
}

.success-burst::before,
.success-burst::after {
    content: "";
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(139,92,246,.25);
    border-radius: 50%;
    animation: successRing 1.4s ease-out infinite;
}

.success-burst::after {
    animation-delay: .35s;
}

.success-burst span {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    animation: successCheck .45s .25s ease both;
}

.success-title {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text);
    margin-bottom: 8px;
}

.success-message {
    color: var(--muted);
    font-size: 12px;
}

.success-loader {
    width: 180px;
    height: 3px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.success-loader span {
    display: block;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--accent),
        var(--cyan)
    );
    animation: successLoading 1.65s linear forwards;
}

@keyframes successAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(.35) rotate(-15deg);
    }

    65% {
        transform: scale(1.12) rotate(4deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes successCheck {
    from {
        opacity: 0;
        transform: scale(.3);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successRing {
    0% {
        opacity: .7;
        transform: scale(.75);
    }

    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

@keyframes successLoading {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* =========================================================
   MOBİL BAŞARILI GİRİŞ / IŞINLANMA EFEKTİ
   ========================================================= */

@media (max-width: 600px) {

    body.login-success-page .login-card {
        animation:
            successCardPulse .55s ease-out .15s both,
            teleportCardOut 1.05s cubic-bezier(.2,.8,.2,1) .65s forwards;
        transform-origin: center center;
        z-index: 20;
    }

    body.login-success-page .login-card::after {
        content: "";
        position: absolute;
        inset: -25px;
        border-radius: 40px;
        pointer-events: none;

        background:
            radial-gradient(
                circle,
                rgba(167, 139, 250, .75) 0%,
                rgba(236, 72, 153, .45) 25%,
                rgba(34, 211, 238, .20) 45%,
                transparent 70%
            );

        filter: blur(18px);
        opacity: 0;

        animation:
            teleportEnergy .9s ease-out .55s forwards;

        z-index: -1;
    }

    body.login-success-page .login-page {
        animation: successPageFade 2.35s ease-out forwards;
    }

    /* İlk küçük titreşim / enerji toplama */

    @keyframes successCardPulse {

        0% {
            transform: scale(1);
            filter: brightness(1);
        }

        25% {
            transform: scale(1.025) rotate(-0.7deg);
            filter: brightness(1.25);
        }

        50% {
            transform: scale(1.04) rotate(0.7deg);
            filter: brightness(1.6);
        }

        75% {
            transform: scale(1.025) rotate(-0.4deg);
            filter: brightness(1.35);
        }

        100% {
            transform: scale(1);
            filter: brightness(1);
        }
    }

    /* Kartın patlayarak küçülüp yok olması */

    @keyframes teleportCardOut {

        0% {
            opacity: 1;
            transform: scale(1);
            filter: brightness(1);
        }

        20% {
            opacity: 1;
            transform: scale(1.06);
            filter: brightness(2);
        }

        40% {
            opacity: .95;
            transform: scale(1.02);
            filter: brightness(3);
        }

        60% {
            opacity: .75;
            transform: scale(.82);
            filter: brightness(4) blur(1px);
        }

        78% {
            opacity: .4;
            transform: scale(.45);
            filter: brightness(5) blur(4px);
        }

        92% {
            opacity: .12;
            transform: scale(.18);
            filter: brightness(7) blur(9px);
        }

        100% {
            opacity: 0;
            transform: scale(.03);
            filter: brightness(9) blur(16px);
        }
    }

    /* Kartın arkasındaki enerji patlaması */

    @keyframes teleportEnergy {

        0% {
            opacity: 0;
            transform: scale(.35);
        }

        25% {
            opacity: .9;
            transform: scale(.7);
        }

        55% {
            opacity: .75;
            transform: scale(1.15);
        }

        100% {
            opacity: 0;
            transform: scale(2.2);
        }
    }

    /* Sayfanın sonlara doğru kararması */

    @keyframes successPageFade {

        0% {
            opacity: 1;
        }

        70% {
            opacity: 1;
        }

        100% {
            opacity: .05;
        }
    }
}