@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --accent-pink: #f093fb;
    --gradient-main: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    --bg-dark: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-light: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #10b981;
}

.logo-img {
    height: 90px;
    width: auto;
    opacity: 0;
    animation: logoEntrance 1s ease-out 0.3s forwards;
    border-radius: 12px;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.6));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-img:hover {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(0 0 35px rgba(240, 147, 251, 0.7));
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-15deg) translateY(-20px);
    }
    60% {
        transform: scale(1.2) rotate(5deg) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 10s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.3) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 60%;
    animation-delay: -2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(10deg); }
}

.back-link {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    z-index: 10;
}

.back-link:hover {
    color: var(--text-white);
    transform: translateX(-5px);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    padding: 48px 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
}

.logo-gradient {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.success-message {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s;
}

.form-group.focused label {
    color: var(--accent-pink);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 14px 18px;
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.input-wrapper svg {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s;
}

.input-wrapper:focus-within svg {
    color: var(--primary);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 15px;
    font-family: inherit;
}

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

.toggle-password {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    color: var(--text-muted);
    transition: color 0.3s;
}

.toggle-password:hover svg {
    color: var(--text-light);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gradient-main);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    padding: 16px 32px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.4);
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 13px;
}

.btn-alternate {
    display: block;
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    transition: all 0.3s;
}

.btn-alternate:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--accent-pink);
}

.auth-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.feature-item svg {
    color: var(--success);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 24px;
    }
    
    .logo-gradient {
        font-size: 28px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .back-link {
        top: 20px;
        left: 20px;
    }
}
