/* GLOBAL STYLES FOR THE MAIN LOGIN AND CREAE ACCOUNT PAGE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: #0a0a0f;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 32px 16px;
    background: #151520;
    border: 1px solid #2a2a35;
    border-radius: 16px;
    /*box-shadow: 0 0 24px 0 var(--neon2, #e040fb);*/
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card:hover::before {
    opacity: 1;
}

.login-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 136, 0.1),
        0 0 40px rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00ff88, #0099ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
    animation: pulse 2s ease-in-out infinite alternate;
}

.login-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #a0a0b0;
    font-size: 16px;
    font-weight: 400;
}

/* Form Group & Input Styles */
.form-group {
    margin-bottom: 5px;
    position: relative;
    gap: 30px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
    }

.input-wrapper input {
    width: 100%;
    background: #1a1a25;
    border: 1px solid #2a2a35;
    border-radius: 6px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #f700ff;
    background: rgba(26, 26, 37, 0.8) !important;
    box-shadow: 
        0 0 0 3px rgba(0, 255, 136, 0.1),
        0 4px 20px rgba(0, 255, 136, 0.1);
}

.input-wrapper input:focus + label,
.input-wrapper input:valid + label {
    transform: translateY(-58px) translateX(-20px) scale(0.9);
    color: #ff0084;
    font-weight: 500;
}

.input-wrapper label {
    position: absolute;
    left: 16px;
    top: 40px;
    color: #a0a0b0;
    transform: translateY(-55px);
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform-origin: left top;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c800ff, #00ff77);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.input-wrapper input:focus ~ .input-line {
    width: 100%;
}

/* Password Toggle */
.password-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #a0a0b0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.password-toggle:hover {
    color: #ff00f2;
    background: rgba(0, 255, 136, 0.1);
}

.toggle-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0a0b0' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-toggle:hover .toggle-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300ff88' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
}

.toggle-icon.show-password {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0a0b0' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 11-4.243-4.243m4.242 4.242L9.88 9.88'/%3e%3c/svg%3e");
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-wrapper input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid #2a2a35;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.custom-checkbox::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 1px;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remember-wrapper input[type="checkbox"]:checked + .checkbox-label .custom-checkbox {
    border-color: #ff00bb;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.remember-wrapper input[type="checkbox"]:checked + .checkbox-label .custom-checkbox::after {
    transform: scale(1);
}

.checkbox-label {
    color: #a0a0b0;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remember-wrapper:hover .checkbox-label {
    color: #ffffff;
}

.forgot-password {
    color: #a0a0b0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.forgot-password:hover {
    color: #00ff88;
}

/* Neon Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff00e6, #0099ff);
    border: none;
    border-radius: 6px;
    padding: 24px 32px;
    color: #0a0a0f;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 10px 30px rgba(0, 255, 136, 0.3),
        0 0 40px rgba(0, 255, 136, 0.2);
}

.login-btn:hover .btn-glow {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #0a0a0f;
    border-radius: 50%;
    opacity: 0;
    animation: spin 1s linear infinite;
    transition: opacity 0.3s ease;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

/* Divider */
.divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2a2a35, transparent);
    transform: translateY(-50%);
}

.divider span {
    background: #151520;
    color: #a0a0b0;
    padding: 0 24px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

/* Signup Link */
.signup-link {
    text-align: center;
}

.signup-link p {
    color: #a0a0b0;
    font-size: 14px;
}

.signup-link a {
    color: #ff00c8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.signup-link a:hover {
    color: #0099ff;
    text-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
}

/* Error States */
.error-message {
    color: #ff0080;
    font-size: 12px;
    font-weight: 500;
    margin-top: 0;
    margin-left: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgb(0, 0, 0);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 0, 128, 0.2);
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 2;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .input-wrapper input {
    border-color: #ff0080;
    background: rgb(11, 11, 11);
    box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.1);
    animation: shake 0.5s ease-in-out;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 40px 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff3c, #0099ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0a0a0a;
    margin: 0 auto 24px;
    animation: successPulse 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.success-message h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-message p {
    color: #a0a0b0;
    font-size: 16px;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.1), transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.glow-orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -10%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.08), transparent 70%);
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.06), transparent 70%);
    animation-delay: -2s;
}

.glow-orb-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 10%;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.04), transparent 70%);
    animation-delay: -4s;
}

/* Animations */
@keyframes pulse {
    from { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3)); }
    to { filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6)); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(10px) translateX(-10px); }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-card {
        padding: 24px;
        margin: 10px;
    }
    
    .login-header h2 {
        font-size: 1.3rem;
    }
    
    .input-wrapper input {
        padding: 8px;
    }

        .input-wrapper label {
        transform: translateY(-50px);
    }
    .input-wrapper input:focus + label,
    .input-wrapper input:valid + label {
        transform: translateY(-50px) translateX(-20px) scale(0.9);
        font-size: 14px;
    }

    
    .password-wrapper input {
        padding-right: 45px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .login-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .glow-orb {
        opacity: 0.5;
    }
    
}

/* MEDIUM SCREENS */
@media (min-width: 481px) and (max-width: 768px) {
    .login-card {
        padding: 32px;
    }
    
    .login-header h2 {
        font-size: 1.9rem;
    }
    
    .input-wrapper input {
        padding: 10px;
    }
    
    .password-wrapper input {
        padding-right: 48px;
    }
        .input-wrapper input {
        padding: 8px;
    }

        .input-wrapper label {
        transform: translateY(-50px);
    }
    .input-wrapper input:focus + label,
    .input-wrapper input:valid + label {
        transform: translateY(-50px) translateX(-20px) scale(0.9);
        font-size: 14px;
    }
}

/* LARGE SCREENS */
@media (min-width: 1200px) {
    .login-container {
        max-width: 340px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .login-card {
        padding: 24px 18px;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(0,255,136,0.07), 0 0 0 1px rgba(0,255,136,0.03);
    }
    .login-header h2 {
        font-size: 1.4rem;
    }
    .login-header p {
        font-size: 13px;
    }
    .input-wrapper input,
    .input-wrapper label {
        font-size: 13px;
        padding: 12px 10px;
    }
    .login-btn {
        font-size: 14px;
        padding: 12px 10px;
    }
    .divider span {
        font-size: 12px;
        padding: 0 8px;
    }
    .success-message {
        padding: 18px 8px;
    }
}

#loginForm, #createForm {
    min-height: 0 !important;
}

/* Desktop screens */
@media (min-width: 992px) and (max-width: 1199px) {
    .login-container {
        max-width: 400px;
        margin: 32px auto;
        min-height: 100vh;
    }

    .login-card {
        padding: 36px 28px;
        border-radius: 16px;
        min-height: 100vh;
    }

    .login-header h2 {
        font-size: 1.9rem;
    }

    .input-wrapper input {
        font-size: 15px;
        padding: 18px 12px;
    }

    .password-wrapper input {
        padding-right: 44px;
    }

    .login-btn {
        font-size: 15px;
        padding: 18px 22px;
    }

    .divider span {
        font-size: 14px;
        padding: 0 16px;
    }

    .success-message {
        padding: 32px 16px;
    }
}

@media (min-width: 992px) {
    #sign-in-form,
    .login-card {
        max-width: 600px;
        min-width: 400px;
        margin: 40px auto;
        padding: 32px 36px;
    }
    h1 {
        font-size: 1.6rem;
        font-weight: 800;
    }
    h4 {
        font-size: 1.2rem;
        font-weight: 700;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 991px) {
    .login-container {
        max-width: 340px;
        margin: 24px auto;
    }

    .login-card {
        padding: 28px 16px;
        border-radius: 12px;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        font-size: 14px;
        padding: 14px 10px;
    }

    .password-wrapper input {
        padding-right: 38px;
    }

    .login-btn {
        font-size: 14px;
        padding: 14px 16px;
    }

    .divider span {
        font-size: 13px;
        padding: 0 10px;
    }

    .success-message {
        padding: 24px 8px;
    }
}

/* Custom Properties and Focus Styles */
:root {
    --neon: #a259ff;
    --neon2: #e040fb;
    /*--neon-glow: 0 0 8px #a259ff, 0 0 16px #e040fb;*/
}

input:focus, .login-card, #sign-in-form {
    box-shadow: var(--neon-glow);
    border-color: var(--neon);
}

h1, h4, label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
input, button {
    font-size: 1rem;
    font-weight: 600;
}

.footer-link {
    text-align: center;
    margin: 24px 0 8px 0;
}
.footer-link a {
    color: var(--neon2, #e040fb);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}
.footer-link a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--neon2, #e040fb);
}

.theme-toggle {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 8px;
}
.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neon2, #e040fb);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.theme-toggle button:focus {
    outline: 2px solid var(--neon2, #e040fb);
}
.theme-toggle button:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--neon2, #e040fb);
}

h1 {
    color: #fff;
    text-align: center;
    margin: 24px 0 16px 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.light-theme h1 {
    color: #181818;
}
