/**
 * Authentication Pages Styles
 * For login.html and register.html
 */

/* Animated Background */
.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: light-dark(
        linear-gradient(-45deg, #10b981, #059669, #34d399, #6ee7b7),
        linear-gradient(-45deg, #065f46, #047857, #059669, #10b981)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating particles effect */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: particleFloat 60s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: light-dark(1, 0.3);
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-60px); }
}

/* Container - Centered Card */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 450px;
    background: light-dark(white, #1e1e1e);
    margin-top: 70px;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: light-dark(
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.6)
    );
    animation: slideUp 0.6s ease;
    position: relative;
    border: 1px solid light-dark(transparent, rgba(255, 255, 255, 0.1));
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-card {
    max-width: 600px;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: light-dark(#1f2937, #f9fafb);
    font-weight: 700;
}

.auth-header p {
    color: light-dark(#6b7280, #9ca3af);
    margin: 0;
    font-size: 1rem;
}

/* Alert Container */
#alert-container {
    margin-bottom: 20px;
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
    border-left: 4px solid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: light-dark(#d1fae5, #064e3b);
    color: light-dark(#065f46, #6ee7b7);
    border-left-color: #10b981;
}

.alert-error {
    background: light-dark(#fee2e2, #7f1d1d);
    color: light-dark(#991b1b, #fca5a5);
    border-left-color: #ef4444;
}

.alert-warning {
    background: light-dark(#fef3c7, #78350f);
    color: light-dark(#92400e, #fcd34d);
    border-left-color: #f59e0b;
}

/* Form */
.auth-form {
    margin-bottom: 25px;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid light-dark(#f3f4f6, #374151);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    color: light-dark(#4b5563, #d1d5db);
    margin: 0 0 25px 0;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: light-dark(#374151, #e5e7eb);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid light-dark(#e5e7eb, #4b5563);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: light-dark(#f9fafb, #111827);
    color: light-dark(#1f2937, #f9fafb);
    font-family: inherit;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-input::placeholder {
    color: light-dark(#9ca3af, #6b7280);
}

.form-group input:focus,
.form-group select:focus,
.form-input:focus {
    outline: none;
    border-color: #10b981;
    background: light-dark(white, #1f2937);
    box-shadow: 0 0 0 4px light-dark(rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover,
.form-input:hover {
    border-color: light-dark(#d1d5db, #6b7280);
}

.form-group input.error {
    border-color: #ef4444;
    background: light-dark(#fef2f2, #7f1d1d);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Error Messages */
.error-message {
    display: block;
    color: light-dark(#ef4444, #fca5a5);
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

.form-help,
small.form-help {
    display: block;
    font-size: 0.85rem;
    color: light-dark(#9ca3af, #6b7280);
    margin-top: 6px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: light-dark(#6b7280, #9ca3af);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #10b981;
}

/* Buttons */
.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

        .password-strength {
            margin-top: 0.5rem;
            font-size: 0.875rem;
        }
        .strength-bar {
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            overflow: hidden;
            margin-top: 0.5rem;
        }
        .strength-fill {
            height: 100%;
            transition: width 0.3s, background-color 0.3s;
            width: 0;
        }
        .strength-weak { background-color: #f44336; width: 33%; }
        .strength-medium { background-color: #ff9800; width: 66%; }
        .strength-strong { background-color: #4caf50; width: 100%; }
        
        .password-requirements {
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: #666;
        }
        .requirement {
            display: flex;
            align-items: center;
            margin: 0.25rem 0;
        }
        .requirement-icon {
            margin-right: 0.5rem;
            font-size: 0.875rem;
        }
        .requirement.met {
            color: #4caf50;
        }
        .requirement.unmet {
            color: #999;
        }
        
        #map {
            height: 300px;
            margin-top: 1rem;
            border-radius: 8px;
            border: 1px solid #ddd;
        }
        
        .location-controls {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        
        .location-controls button {
            flex: 1;
            padding: 0.5rem;
            border: 1px solid #ddd;
            background: white;
            cursor: pointer;
            border-radius: 4px;
            font-size: 0.875rem;
        }
        
        .location-controls button:hover {
            background: #f5f5f5;
        }
        
        .map-instructions {
            font-size: 0.875rem;
            color: #666;
            margin-top: 0.5rem;
        }

/* Links */
.link,
.link-text {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.link:hover,
.link-text:hover {
    color: #059669;
    text-decoration: underline;
}

.link-primary {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link-primary:hover {
    color: #059669;
    text-decoration: underline;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid light-dark(#f3f4f6, #374151);
}

.auth-footer p {
    color: light-dark(#6b7280, #9ca3af);
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-card {
        padding: 40px 30px;
    }

    .register-card {
        padding: 40px 25px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-input {
        padding: 12px 16px;
    }

    .btn {
        padding: 14px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}