:root {
    --primary: #0a0a0a;
    --surface: #141414;
    --surface-hover: #1a1a1a;
    --border: #262626;
    --border-hover: #404040;
    --text: #fafafa;
    --text-muted: #737373;
    --accent: #ffffff;
}

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

body.login-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text);
    overflow: hidden;
    position: relative;
}

.background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: #ffffff;
    top: -300px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: #a3a3a3;
    bottom: -200px;
    left: -150px;
    animation-delay: -8s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #525252;
    top: 40%;
    left: 60%;
    animation-delay: -16s;
}

.grid-pattern {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
}

.particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: rise 20s ease-in-out infinite;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.header {
    text-align: center;
    margin-bottom: 28px;
}

.header h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.error-msg {
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
    font-size: 13px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--primary);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 0;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text);
}

.password-toggle svg {
    display: block;
}

.options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--primary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.remember input[type="checkbox"]:hover {
    border-color: var(--border-hover);
}

.remember input[type="checkbox"]:checked {
    background: var(--text);
    border-color: var(--text);
}

.remember input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember span {
    font-size: 13px;
    color: var(--text-muted);
}

.submit-btn {
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--text);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.helper-text {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.helper-text a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.helper-text a:hover {
    opacity: 0.8;
}

.loading .submit-btn {
    pointer-events: none;
    opacity: 0.7;
}

.loading .submit-btn span::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(60px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-40px, 50px) scale(0.9);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

@keyframes rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .header h1 {
        font-size: 22px;
    }
}
