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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0805 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #f5f5f5;
    position: relative;
    overflow-x: hidden;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.branding-section {
    text-align: center;
    margin-bottom: 20px;
    animation: slideDownFade 0.8s ease-out;
}

.brand-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.15);
    letter-spacing: 3px;
}

.brand-subtitle {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.brand-description {
    font-size: 14px;
    color: #888888;
    font-style: italic;
    margin-bottom: 10px;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: slideUpFade 0.8s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(26, 20, 16, 0.9);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.toggle-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: #666666;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.toggle-btn.active {
    background: #ffffff;
    color: #000000;
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.3),
        inset 0 0 15px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.login-card {
    background: linear-gradient(135deg, rgba(26, 20, 16, 0.97) 0%, rgba(15, 13, 10, 0.99) 100%);
    border-radius: 16px;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(255, 255, 255, 0.02);
    padding: 50px;
    overflow: hidden;
    display: none;
    animation: cardFadeIn 0.5s ease-out;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.login-card.active {
    display: block;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.login-header h1 {
    color: #ffffff;
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

.login-header p {
    color: #888888;
    font-size: 14px;
    font-weight: 500;
}

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

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

.form-group label {
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.form-group input {
    padding: 13px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(15, 13, 10, 0.95) 0%, rgba(20, 18, 15, 0.95) 100%);
    color: #ffffff;
    font-weight: 500;
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(20, 18, 15, 0.97) 0%, rgba(25, 23, 20, 0.97) 100%);
}

.form-group input:focus {
    outline: none;
    border-color: #ffffff;
    background: linear-gradient(135deg, rgba(25, 23, 20, 0.98) 0%, rgba(30, 28, 25, 0.98) 100%);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
    color: #555555;
    font-weight: 400;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666666;
}

.toggle-password:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.error-message {
    color: #ff6b6b;
    font-size: 12px;
    min-height: 18px;
    display: block;
    font-weight: 500;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #888888;
    font-weight: 500;
    transition: color 0.2s ease;
}

.remember-me:hover {
    color: #ffffff;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ffffff;
}

.forgot-password {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.forgot-password:hover {
    color: #cccccc;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.login-button {
    padding: 14px 20px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 15px;
    width: 100%;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-button:hover {
    background: #f0f0f0;
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.4),
        0 12px 30px rgba(255, 255, 255, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.login-button:active {
    transform: translateY(-1px);
}

.login-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888888;
    font-size: 14px;
    font-weight: 500;
}

.signup-link,
.switch-to-signup,
.switch-to-login {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
}

.signup-link:hover,
.switch-to-signup:hover,
.switch-to-login:hover {
    color: #cccccc;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.success-message {
    display: none;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(30, 70, 32, 0.95) 0%, rgba(25, 65, 28, 0.95) 100%);
    color: #4caf50;
    border: 1.5px solid #4caf50;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    animation: slideUpFade 0.3s ease-out;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

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

/* Responsive design */
@media (max-width: 600px) {
    .auth-wrapper {
        max-width: 100%;
        gap: 20px;
    }

    .branding-section {
        margin-bottom: 10px;
    }

    .brand-title {
        font-size: 40px;
        letter-spacing: 2px;
    }

    .brand-subtitle {
        font-size: 16px;
    }

    .login-card {
        padding: 35px 25px;
        border-radius: 14px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .login-container {
        max-width: 100%;
    }
}
