/* ===================================
   MODERN AUTH PAGE - MY SAFETY APP
   =================================== */

/* CSS Variables & Design Tokens */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-hover: rgba(255, 255, 255, 0.12);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #0a0a0f 100%);
}

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

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -10%;
    right: -10%;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Main Container */
.auth-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Branding Section */
.branding-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-xl);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse 3s infinite;
}

.logo-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

.brand-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-content {
    max-width: 500px;
}

.tagline {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.feature-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: var(--bg-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Form Section */
.form-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
}

.form-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
}

/* Toggle Buttons */
.auth-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xs);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--primary-gradient);
    border-radius: calc(var(--radius-md) - 4px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.auth-toggle.register-active .toggle-slider {
    transform: translateX(calc(100% + 4px));
}

.toggle-btn {
    padding: var(--spacing-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
}

.toggle-btn.active {
    color: var(--text-primary);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.form-header h2 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Social Auth */
.social-auth {
    margin-bottom: var(--spacing-md);
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: white;
    color: #1f1f1f;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.google-icon {
    width: 24px;
    height: 24px;
}

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

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

.divider span {
    padding: 0 var(--spacing-md);
}

/* Input Form */
.input-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input {
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: var(--secondary-gradient);
    transition: width var(--transition-normal);
}

.password-strength.weak .strength-bar {
    width: 33%;
    background: #f5576c;
}

.password-strength.medium .strength-bar {
    width: 66%;
    background: #f093fb;
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    position: relative;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

.checkbox-container input:checked~.checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label {
    color: var(--text-secondary);
}

.forgot-password,
.link {
    color: #667eea;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-password:hover,
.link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Form States */
.auth-form {
    transition: opacity var(--transition-normal);
}

.auth-form.hidden {
    display: none;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    border-radius: var(--radius-xl);
    z-index: 10;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Success Message */
.success-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    border-radius: var(--radius-xl);
    z-index: 10;
    text-align: center;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.success-message p {
    color: var(--text-secondary);
}

/* Footer */
.footer-text {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.footer-text p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-size: 0.9375rem;
}

.toast.success {
    border-left: 4px solid #43e97b;
}

.toast.error {
    border-left: 4px solid #f5576c;
}

.toast.info {
    border-left: 4px solid #4facfe;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .branding-section {
        display: none;
    }
}

@media (max-width: 640px) {
    .form-section {
        padding: var(--spacing-md);
    }

    .form-container {
        padding: var(--spacing-lg);
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
}