* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Purple Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 35, 0.8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6 0%, #a855f7 50%, #7c3aed 100%);
    border-radius: 10px;
    border: 2px solid rgba(15, 15, 35, 0.8);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a855f7 0%, #c084fc 50%, #8b5cf6 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #7c3aed 0%, #8b5cf6 50%, #6d28d9 100%);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(15, 15, 35, 0.8);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 50%, #0f0f23 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(109, 40, 217, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10%, -10%) rotate(180deg); }
}

/* Grid pattern overlay */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: rgba(17, 24, 39, 0.8);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

/* Decorative glow effect */
.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-section {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.logo img {
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.form-section {
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8b5cf6;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    background: rgba(15, 15, 35, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    color: #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.input-group input[type="password"] {
    padding-right: 3.5rem;
}

.input-group input::placeholder {
    color: #6b7280;
}

.input-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(15, 15, 35, 0.8);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1),
                0 4px 12px rgba(139, 92, 246, 0.2);
}

.input-group input:focus ~ i {
    color: #a855f7;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    z-index: 10;
}

.toggle-password:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.forgot-password {
    text-align: right;
    margin-bottom: 2rem;
    margin-top: -0.5rem;
}

.forgot-password a {
    color: #8b5cf6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: #a855f7;
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.auth-btn.primary:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: transparent;
    color: #9ca3af;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.auth-btn.secondary:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: #8b5cf6;
}

.alert {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Loading state */
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn.loading {
    position: relative;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Two-Factor Authentication Styles */
.two-factor-section {
    text-align: center;
}

.two-factor-header {
    margin-bottom: 2.5rem;
}

.two-factor-header i {
    font-size: 3.5rem;
    color: #8b5cf6;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
}

.two-factor-header h3 {
    color: #e5e7eb;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.two-factor-header p {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0;
}

.two-factor-input input {
    text-align: center;
    font-size: 1.75rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
    padding-left: 3rem;
}

.two-factor-help {
    margin: 1.5rem 0 2.5rem 0;
}

.two-factor-help p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin: 0;
}

.two-factor-help a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.two-factor-help a:hover {
    color: #a855f7;
    text-decoration: underline;
}

/* Forgot Password Styles */
.forgot-password-section {
    text-align: center;
}

.forgot-password-header {
    margin-bottom: 2.5rem;
}

.forgot-password-header i {
    font-size: 3.5rem;
    color: #8b5cf6;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
}

.forgot-password-header h3 {
    color: #e5e7eb;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.forgot-password-header p {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 15, 35, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    transition: width 0.3s ease;
    z-index: 0;
}

.contact-option.discord::before {
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.1) 0%, transparent 100%);
}

.contact-option.whatsapp::before {
    background: linear-gradient(90deg, rgba(37, 211, 102, 0.1) 0%, transparent 100%);
}

.contact-option:hover::before {
    width: 100%;
}

.contact-option:hover {
    transform: translateX(5px);
    border-color: rgba(139, 92, 246, 0.5);
}

.contact-option.discord:hover {
    border-color: rgba(88, 101, 242, 0.5);
}

.contact-option.whatsapp:hover {
    border-color: rgba(37, 211, 102, 0.5);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.contact-option.discord .contact-icon {
    background: rgba(88, 101, 242, 0.15);
    color: #5865F2;
}

.contact-option.whatsapp .contact-icon {
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-info {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
}

.contact-info h4 {
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.contact-option > i {
    color: #6b7280;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-option:hover > i {
    color: #8b5cf6;
    transform: translateX(5px);
}

.forgot-password-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    border-left: 3px solid #8b5cf6;
    margin-bottom: 2rem;
}

.forgot-password-note i {
    color: #8b5cf6;
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.forgot-password-note p {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .logo img {
        height: 50px !important;
    }
    
    .input-group input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 0.95rem;
    }
    
    .auth-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .two-factor-header i {
        font-size: 3rem;
    }
    
    .two-factor-header h3 {
        font-size: 1.5rem;
    }
    
    .two-factor-input input {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
    }
}
