/* Auth page styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background effects */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.auth-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.auth-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    pointer-events: none;
}

/* Main container */
.auth-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.auth-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: var(--shadow);
    width: 100%;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.auth-tab {
    flex: 1;
    padding: 14px 24px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.auth-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.auth-tab:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.auth-tab:hover::before {
    opacity: 0.08;
}

.auth-tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--glow);
}

.auth-tab.active::before {
    opacity: 1;
}

/* Form wrapper */
.auth-content {
    width: 100%;
    position: relative;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.auth-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow);
    z-index: 10;
}

.auth-back-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.auth-form-wrapper {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.auth-form-wrapper.active {
    display: block;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.auth-form-header h1,
.auth-form-header h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
    line-height: 1.2;
}

.auth-form-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Form */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:has(input:focus) .input-icon {
    color: var(--accent);
}

/* Button */
.auth-button {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow);
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button svg {
    transition: transform 0.3s ease;
}

.auth-button:hover svg {
    transform: translateX(4px);
}

/* Error message */
.auth-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 24px;
    animation: shake 0.5s ease;
}

.auth-error svg {
    flex-shrink: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Responsive */
@media (max-width: 640px) {
    .auth-container {
        padding: 24px 16px;
    }
    
    .auth-title {
        font-size: 32px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .auth-form-header h1,
    .auth-form-header h2 {
        font-size: 32px;
    }
    
    .auth-back-btn {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
    }
    
    .auth-tabs {
        margin-bottom: 24px;
    }
    
    .auth-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
}
