* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #0a0a0f;
    --bg-card: rgba(30, 30, 45, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b5;
    --accent-purple: #b48eff;
    --accent-purple-light: #c9a8ff;
    --accent-purple-glow: rgba(180, 142, 255, 0.4);
    --accent-purple-dark: #9966ff;
    --accent-red: #ff4757;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(180, 142, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 142, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(180, 142, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 30px var(--accent-purple-glow);
}

.logo-text {
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 1px;
}

.logo-text span {
    color: var(--accent-purple);
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-container h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 35px;
}

.alert {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--accent-red);
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
}

.alert.show {
    display: flex;
}

.alert.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.alert.success.show {
    display: flex;
}

.alert i {
    font-size: 16px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-group input {
    width: 100%;
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px 16px 16px 52px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(180, 142, 255, 0.1);
}

.input-group input:focus + i {
    color: var(--accent-purple);
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-dark));
    color: white;
    box-shadow: 0 8px 30px var(--accent-purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--accent-purple-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-switch {
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.auth-switch a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--accent-purple-light);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 900px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-item i {
    font-size: 48px;
    color: var(--accent-purple);
    margin-bottom: 20px;
    display: block;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-box {
        padding: 40px 30px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .auth-container {
        gap: 40px;
    }
}
