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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    backdrop-filter: blur(18px);
    margin: 2rem;
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    display: flex;
    max-width: 1100px;
    width: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.login-form {
    flex: 1;
    padding: 3.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.login-form h1 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-form p {
    color: #a0aec0;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    color: #cce7ff;
    background: rgba(0, 212, 255, 0.08);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: #cbd5e0;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #2d3748;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #2d3748;
    color: #ffffff;
}

.form-group .hint {
    display: block;
    margin-top: 0.35rem;
    color: #9fb3c8;
    font-size: 0.9rem;
}

.username-status {
    display: block;
    min-height: 1.35rem;
    margin-top: 0.25rem;
    color: #9fb3c8;
    font-size: 0.9rem;
}

.username-status.available {
    color: #68d391;
}

.username-status.unavailable,
.username-status.invalid {
    color: #ff8a8a;
}

.username-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.username-suggestions button {
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.08);
    color: #cce7ff;
    cursor: pointer;
    font: inherit;
}

.username-suggestions button:hover,
.username-suggestions button:focus-visible {
    border-color: #00d4ff;
    color: #00d4ff;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #a0aec0;
}

.remember-forgot input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: #00d4ff;
}

.forgot-password {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #64b5f6;
}

.btn-login {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0f0f0f;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 212, 255, 0.35);
}

.divider {
    text-align: center;
    margin: 2rem 0;
    color: #4a5568;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #2d3748;
}

.divider span {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    padding: 0 1rem;
    position: relative;
}

.social-buttons {
    display: flex;
    gap: 1rem;
}

.btn-social {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #2d3748;
    border-radius: 8px;
    background: #2d3748;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #cbd5e0;
}

.btn-social:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.signup-link {
    text-align: center;
    margin-top: 1.25rem;
    color: #a0aec0;
}

.signup-link a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
}

.signup-link a:hover {
    text-decoration: underline;
}

.login-illustration {
    flex: 1;
    background: radial-gradient(circle at 30% 20%, rgba(0, 153, 204, 0.25), transparent 35%),
                radial-gradient(circle at 80% 10%, rgba(0, 212, 255, 0.28), transparent 30%),
                linear-gradient(135deg, #0c1224 0%, #0b1a32 50%, #0a1026 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 3rem;
    text-align: center;
    position: relative;
}

.illustration-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
}

.login-illustration h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #00d4ff;
}

.login-illustration p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.8;
    color: #cbd5e0;
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
    color: #cbd5e0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    padding: 0;
    max-width: 360px;
}

.feature-list li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-list li::before {
    content: '•';
    color: #00d4ff;
    position: absolute;
    left: 0;
    top: 0;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ff6b6b;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #ff6b6b;
    display: none;
}

.error-message.show {
    display: block;
}

.mode-toggle {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.mode-toggle button {
    flex: 1;
    padding: .5rem;
    border: 2px solid #2d3748;
    background: #2d3748;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.mode-toggle button.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0f0f0f;
    border-color: #00d4ff;
}

.register-only {
    display: none;
}

.register-only.show {
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox-label {
    display: inline-flex;
    gap: 0.5rem;
    align-items: flex-start;
    color: #cbd5e0;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
    accent-color: #00d4ff;
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-form {
        padding: 2rem;
    }

    .login-illustration {
        padding: 2rem;
        min-height: 250px;
    }

    .illustration-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .login-illustration h2 {
        font-size: 1.3rem;
    }

    .social-buttons {
        flex-direction: column;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 100%;
        margin: 1rem;
        border-radius: 10px;
    }

    .login-form {
        padding: 2rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .login-form h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-form p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    label {
        font-size: 0.9rem;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 0.7rem;
        font-size: 1rem;
    }

    .btn-login {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 1rem;
        font-size: 0.85rem;
    }

    .divider {
        margin: 1.5rem 0;
    }

    .social-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .social-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .signup-link {
        font-size: 0.9rem;
    }

    .login-illustration {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 0.5rem;
        border-radius: 8px;
    }

    .login-form {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .login-form h1 {
        font-size: 1.3rem;
    }

    .login-form p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 0.6rem;
        font-size: 16px;
    }

    .btn-login {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}
