* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --border: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent: #00d9ff;
    --accent-hover: #00b8d4;
}

body.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.auth-background {
    min-height: 100vh;
    background: var(--bg-primary);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 140px 60px 60px;
    gap: 80px;
    position: relative;
}

/* Hero Section */
.auth-hero {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
}

.hero-content {
    max-width: 600px;
}

.hero-logo {
    margin-bottom: 32px;
}

.hero-logo svg {
    stroke: var(--text-primary);
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-features-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.auth-feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 217, 255, 0.2);
}

.auth-feature-card:hover::before {
    opacity: 1;
}

.auth-feature-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.auth-feature-card:hover .auth-feature-icon {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent);
    transform: scale(1.1);
}

.auth-feature-icon svg {
    stroke: var(--accent);
}

.auth-feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.15);
}

.feature-item svg {
    stroke: var(--accent);
    flex-shrink: 0;
}

.feature-item span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo svg {
    stroke: var(--text-primary);
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--bg-tertiary);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.social-auth {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.social-btn svg {
    flex-shrink: 0;
}

.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.auth-submit-btn {
    width: 100%;
    height: 48px;
    position: relative;
    border: none;
    border-radius: 9999px;
    padding: 1px;
    background: transparent;
    cursor: pointer;
    margin-top: 8px;
    overflow: hidden;
}

.auth-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.button-border-animate {
    position: absolute;
    inset: -1000%;
    background: conic-gradient(from 90deg at 50% 50%, #E2CBFF 0%, #393BB2 50%, #E2CBFF 100%);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.button-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: #0a0a0a;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}

.auth-submit-btn:hover .button-content {
    background: #141414;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
}

.auth-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--text-secondary);
}

.auth-footer .terms {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.6;
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer-text p {
    color: var(--text-secondary);
    font-size: 12px;
}

.error-message {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 13px;
    display: none;
    animation: slideIn 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .auth-background {
        grid-template-columns: 1fr;
        padding: 140px 32px 60px;
        gap: 60px;
    }
    
    .auth-hero {
        justify-content: center;
        padding-right: 0;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-features-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .auth-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-features-cards {
        grid-template-columns: 1fr;
    }
    
    .auth-background {
        padding: 120px 20px 40px;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .auth-background {
        padding: 100px 16px 32px;
        gap: 32px;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo svg {
        width: 40px;
        height: 40px;
    }
    
    .auth-tabs {
        margin-bottom: 24px;
    }
    
    .tab-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .hero-logo svg {
        width: 60px;
        height: 60px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 32px;
    }
    
    .social-btn {
        width: 52px;
        height: 52px;
    }
    
    .social-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .auth-feature-card {
        padding: 20px;
    }
    
    .auth-feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .auth-feature-icon svg {
        width: 24px;
        height: 24px;
    }
}