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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    --dark-gradient: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(31, 38, 135, 0.37);
    
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(255, 255, 255, 0.3);
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms 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, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ===== Gradient Background ===== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-gradient);
    z-index: -2;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(118, 75, 162, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== Decorative Elements ===== */
.decorative-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), transparent);
    backdrop-filter: blur(2px);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    right: -150px;
    animation-delay: 0s;
    background: radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.15), transparent);
}

.circle-2 {
    width: 350px;
    height: 350px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
    background: radial-gradient(circle at 30% 30%, rgba(245, 87, 108, 0.15), transparent);
}

.circle-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
    background: radial-gradient(circle at 30% 30%, rgba(118, 75, 162, 0.1), transparent);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

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

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.luxury-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #d4d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

/* ===== Glass Effect Card ===== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 3rem;
    border-radius: 24px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

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

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-base);
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 400;
    transition: all var(--transition-base);
    outline: none;
}

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

.form-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--text-secondary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

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

.error-message {
    font-size: 0.8125rem;
    color: var(--error);
    margin-left: 0.25rem;
    min-height: 1rem;
    display: block;
}

/* ===== Password Strength Indicator ===== */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bars {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background-color var(--transition-base);
}

.strength-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Password strength states */
.strength-weak .strength-bar:nth-child(1) {
    background: var(--error);
}

.strength-fair .strength-bar:nth-child(1),
.strength-fair .strength-bar:nth-child(2) {
    background: var(--warning);
}

.strength-good .strength-bar:nth-child(1),
.strength-good .strength-bar:nth-child(2),
.strength-good .strength-bar:nth-child(3) {
    background: #3b82f6;
}

.strength-strong .strength-bar {
    background: var(--success);
}

/* ===== Form Options ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-base);
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary-gradient);
    border-color: transparent;
}

.checkbox-label input:checked ~ .checkmark::after {
    transform: rotate(45deg) scale(1);
}

.link-text {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
    font-size: 0.875rem;
}

.link-text:hover {
    color: #c7d2fe;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.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::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-large {
    width: 100%;
    padding: 1.125rem 2rem;
    font-size: 1rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loader {
    display: block;
}

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* ===== Social Login ===== */
.social-login {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.social-btn {
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== Auth Footer ===== */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== Back Home Button ===== */
.back-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-base);
    z-index: 10;
}

.back-home svg {
    width: 18px;
    height: 18px;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: translateX(-4px);
}

/* ===== Responsive Design ===== */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .back-home {
        top: 1rem;
        left: 1rem;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .auth-title {
        font-size: 1.875rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-container,
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.form-input:focus-visible,
.social-btn:focus-visible,
.link-text:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}
