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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-delay: -2s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* Card */
.box {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: var(--transition);
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.25);
}

/* Logo */
.logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 2rem;
    display: block;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-left: 4px;
}

/* Input Fields */
.input_field {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.input_field:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.input_field::placeholder {
    color: var(--text-light);
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn::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;
}

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

.btn:hover::before {
    left: 100%;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Success Button */
.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

/* Error Messages */
.error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.2);
    border-radius: var(--border-radius);
    display: none;
}

.error.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

/* Success Messages */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--success-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.6s ease-out;
}

.success-icon::after {
    content: '✓';
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading State */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.password-strength.show {
    opacity: 1;
}

.password-strength-bar {
    height: 100%;
    background: var(--secondary-gradient);
    width: 0%;
    transition: width 0.3s, background 0.3s;
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: var(--success-gradient);
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .box {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .logo {
        width: 64px;
        height: 64px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: rgba(45, 55, 72, 0.95);
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-light: #a0aec0;
        --border-color: #4a5568;
    }
    
    .input_field {
        background: rgba(45, 55, 72, 0.8);
        color: var(--text-primary);
    }
    
    .input_field:focus {
        background: rgba(45, 55, 72, 1);
    }
}

/* Additional animations for better UX */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

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