/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --primary-neon: #00f2ff;
    --secondary-neon: #bc00ff;
    --dark-bg: #05050a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: #000;
    color: var(--text-white);
    overflow: hidden;
}

/* Background Elements */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.portal-bg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: url('../login-bg.png') no-repeat center center;
    background-size: cover;
    filter: blur(8px) brightness(1.2) contrast(1.1) grayscale(0.2);
    /* Added blur and refined colors */
    z-index: 1;
    transition: transform 0.2s ease-out, filter 1.5s ease-in-out;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);
    z-index: 3;
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-neon);
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(2px);
    animation: drift linear infinite;
}

@keyframes drift {
    from {
        transform: translateY(0) translateX(0) rotate(0);
    }

    to {
        transform: translateY(-100vh) translateX(50px) rotate(360deg);
    }
}

/* Login Container */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    width: 420px;
    padding: 50px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent,
            var(--primary-neon),
            transparent 30%);
    animation: rotate 6s linear infinite;
    opacity: 0.1;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.pass-span {
    color: var(--text-white);
}

.on-span {
    color: var(--primary-neon);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.welcome-msg {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Form Styling */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    margin-left: 4px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    transition: color 0.3s;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px 14px 48px;
    color: var(--text-white);
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-neon);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.form-input:focus+i {
    color: var(--primary-neon);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-dim);
}

.remember-me input {
    margin-right: 8px;
    accent-color: var(--primary-neon);
}

.forgot-password {
    color: var(--primary-neon);
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.3);
}

.login-button:active {
    transform: translateY(1px);
}

.login-button .btn-content {
    position: relative;
    z-index: 1;
}

.login-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: 0.5s;
}

.login-button:hover::after {
    left: 100%;
}

.social-login {
    text-align: center;
}

.social-title {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.social-title::before,
.social-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
    margin: 0 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s;
}

.social-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
    transform: translateY(-3px);
}

/* Response for Mobile */
@media (max-width: 480px) {
    .login-card {
        padding: 40px 25px;
    }
}