@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
    --bg-dark: #05060a;
    --glass: rgba(10, 12, 20, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #5fd4ff;
    --accent-strong: #ff6cab;
    --text-main: #f4f6ff;
    --text-muted: rgba(244, 246, 255, 0.65);
    --input-bg: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 20% 20%, rgba(95, 212, 255, 0.25), transparent 45%),
        radial-gradient(circle at 80% 15%, rgba(255, 108, 171, 0.25), transparent 40%),
        linear-gradient(120deg, rgba(3, 7, 16, 0.85), rgba(5, 14, 30, 0.7)),
        url("assets/background.jpg") center/cover no-repeat;
    filter: blur(3px);
    opacity: 0.95;
    z-index: 0;
    animation: slowPan 30s ease-in-out infinite alternate;
}

.login-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect fill='%23000000' opacity='0.2' width='1' height='1'/%3E%3C/svg%3E");
    opacity: 0.35;
    mix-blend-mode: screen;
    z-index: 1;
}

.leave-btn {
    position: fixed;
    right: 28px;
    top: 28px;
    z-index: 4;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.leave-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.login-shell {
    position: relative;
    z-index: 3;
    width: min(1100px, 90vw);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    padding: 40px;
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: 10%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 60%);
    filter: blur(60px);
    opacity: 0.7;
    z-index: -1;
    animation: pulseGlow 8s ease-in-out infinite;
}

.login-hero {
    border-radius: 32px;
    padding: 40px;
    background: linear-gradient(145deg, rgba(11, 19, 35, 0.92), rgba(6, 8, 18, 0.9));
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 50%);
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.login-hero:hover::after {
    opacity: 1;
}

.hero-badge {
    display: inline-flex;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.login-hero h1 {
    margin: 24px 0 12px;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.login-hero p {
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 520px;
}

.hero-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 34px;
}

.hero-tags li {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-socials {
    display: flex;
    gap: 18px;
}

.hero-socials a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.hero-socials a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.login-card {
    border-radius: 32px;
    padding: 40px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: -30% 10% auto;
    height: 120px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(95, 212, 255, 0.4), rgba(255, 108, 171, 0.4));
    filter: blur(40px);
    opacity: 0.6;
    animation: sweep 10s linear infinite;
}

.login-card::after {
    content: "";
    position: absolute;
    inset: 15% 5% 5% 40%;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0.3;
    transform: rotate(2deg);
}

.login-card > * {
    position: relative;
    z-index: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.card-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.25);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header p {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.card-header h2 {
    margin: 6px 0 0;
    font-size: 1.6rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field input {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 18px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(95, 212, 255, 0.25);
    transform: translateY(-1px);
}

.cta-btn {
    margin-top: 10px;
    border: none;
    border-radius: 20px;
    padding: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: #05060a;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.45);
    filter: saturate(1.2);
}

.error-banner {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 98, 98, 0.4);
    background: rgba(255, 80, 80, 0.12);
    color: #ffb1b1;
    font-size: 0.85rem;
}

.card-hint {
    margin-top: 22px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 780px) {
    .login-shell {
        padding: 30px 20px 60px;
    }

    .login-hero,
    .login-card {
        padding: 32px 26px;
    }

    .leave-btn {
        position: absolute;
    }
}

@keyframes slowPan {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(-2%, -3%, 0) scale(1.05);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes sweep {
    0% {
        transform: translateY(-60px) rotate(-5deg);
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(260px) rotate(5deg);
        opacity: 0.3;
    }
}
