/* =================================================================
   REGISTER PAGE - ADDITIONAL STYLES
================================================================= */

/* Base Auth Styles (from login.css) */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    background: radial-gradient(ellipse at center, rgba(52, 143, 80, 0.1) 0%, transparent 70%);
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M20 20h60v60H20z' fill='none' stroke='%23348f50' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E") repeat;
    opacity: 0.05;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.auth-form-section {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 50px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.auth-logo .logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(52, 143, 80, 0.3);
}

.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.auth-form .form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    z-index: 2;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #56b4d3;
    box-shadow: 0 0 0 4px rgba(86, 180, 211, 0.1);
    background: var(--bg-primary);
}

/* Enhanced Password Toggle Styling */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    z-index: 2;
    transition: var(--transition);
    padding: 5px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(86, 180, 211, 0.1);
    transform: scale(1.1);
}

.password-toggle:active {
    transform: scale(0.95);
}

.password-toggle:focus {
    outline: 2px solid #56b4d3;
    outline-offset: 2px;
}

/* Enhanced input styling for better password toggle positioning */
.input-group .form-input {
    padding-right: 55px; /* Make room for the toggle button */
}

.auth-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

.btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    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: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.divider span {
    background: var(--bg-card);
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    border-color: #56b4d3;
    background: rgba(86, 180, 211, 0.1);
    transform: translateY(-2px);
}

.social-btn:active {
    transform: scale(0.95) translateY(-1px);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn.google-btn:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.social-btn.apple-btn:hover {
    border-color: #000;
    color: var(--text-primary);
}

.social-btn.github-btn:hover {
    border-color: #333;
    color: var(--text-primary);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .social-btn.apple-btn:hover {
    border-color: #fff;
    color: #fff;
}

[data-theme="dark"] .social-btn.github-btn:hover {
    border-color: #fff;
    color: #fff;
}

.social-icon {
    font-size: 1.1rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-link {
    color: #56b4d3;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: #348f50;
    text-decoration: underline;
    text-decoration-color: #56b4d3;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Features Section */
.auth-features-section {
    padding: 50px;
}

.features-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.features-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ===== REGISTER-SPECIFIC ENHANCEMENTS ===== */

/* Form Row Layout for First/Last Name */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

/* Enhanced Input Group for Validation Icons */
.validation-icon {
    position: absolute;
    right: 50px; /* Position after password toggle if present */
    font-size: 1.1rem;
    z-index: 3;
    opacity: 0;
    transition: var(--transition);
}

.input-group:not(.has-toggle) .validation-icon {
    right: 15px; /* Position normally if no toggle button */
}

.validation-icon.valid {
    color: #00d4aa;
    opacity: 1;
}

.validation-icon.invalid {
    color: #ff4757;
    opacity: 1;
}

.validation-icon.valid::after {
    content: '✓';
}

.validation-icon.invalid::after {
    content: '✗';
}

/* Password Toggle Enhancement for Register */
.input-group .password-toggle + .validation-icon {
    right: 85px; /* Adjust for both toggle and validation */
}

/* Password Strength Meter */
.password-strength {
    margin-top: 10px;
    opacity: 0;
    transition: var(--transition);
}

.password-strength.active {
    opacity: 1;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 25%;
    background: #ff4757;
}

.strength-fill.fair {
    width: 50%;
    background: #ff6b35;
}

.strength-fill.good {
    width: 75%;
    background: #ffd700;
}

.strength-fill.strong {
    width: 100%;
    background: #00d4aa;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.strength-requirements {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.requirement.met {
    color: #00d4aa;
}

.requirement-icon {
    width: 16px;
    text-align: center;
}

/* Enhanced Checkbox Section */
.form-checkboxes {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(86, 180, 211, 0.05);
    border: 1px solid rgba(86, 180, 211, 0.1);
    border-radius: var(--border-radius);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    transition: var(--transition);
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.form-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.form-checkbox:checked + .checkmark {
    background: #56b4d3;
    border-color: #56b4d3;
    transform: scale(1.1);
}

.form-checkbox:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Benefits Section */
.benefits-list {
    margin-bottom: 40px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.benefit-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 143, 80, 0.15);
    border-color: rgba(86, 180, 211, 0.3);
}

.benefit-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.benefit-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.benefit-text p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Signup Steps */
.signup-steps {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(86, 180, 211, 0.03) 100%);
    border: 1px solid rgba(86, 180, 211, 0.1);
    border-radius: var(--border-radius);
}

.signup-steps h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-primary);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 50px;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #56b4d3, transparent);
    z-index: 1;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(52, 143, 80, 0.3);
    z-index: 2;
    position: relative;
}

.step-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.step-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 25px;
    background: rgba(0, 212, 170, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.1);
    border-radius: var(--border-radius);
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.badge-icon {
    font-size: 1.8rem;
    color: #00d4aa;
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Enhanced Form Validation */
.form-input.valid {
    border-color: #00d4aa !important;
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.1) !important;
}

.form-input.invalid {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1) !important;
}

.form-input.checking {
    border-color: #ffd700 !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1) !important;
}

/* Loading States */
.input-group.loading .form-input {
    background-image: linear-gradient(90deg, transparent, rgba(86, 180, 211, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.auth-form.submitting {
    pointer-events: none;
    opacity: 0.7;
}

.auth-form.submitting .form-input {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

/* Caps lock warning styling */
.caps-warning {
    color: #ff6b35 !important;
    font-size: 0.8rem !important;
    margin-top: 5px !important;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: fadeInShake 0.5s ease-out;
}

@keyframes fadeInShake {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-features-section {
        order: -1;
        padding: 30px 20px;
        text-align: center;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .features-content h2 {
        font-size: 2rem;
    }

    .steps-list {
        gap: 25px;
    }

    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .step-item:not(:last-child)::after {
        display: none;
    }

    .security-badges {
        flex-direction: column;
        gap: 20px;
    }

    .social-login {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .checkbox-label {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 80px 15px 20px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .form-checkboxes {
        padding: 15px;
    }

    .signup-steps {
        padding: 20px 15px;
    }

    .benefit-item {
        padding: 15px;
    }

    .features-content h2 {
        font-size: 1.6rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .password-toggle {
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .input-group .form-input {
        padding-right: 50px;
    }
    
    .password-toggle[aria-label]:hover::after {
        display: none; /* Hide tooltip on mobile */
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .form-checkboxes {
    background: rgba(86, 180, 211, 0.08);
    border-color: rgba(86, 180, 211, 0.15);
}

[data-theme="dark"] .signup-steps {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(86, 180, 211, 0.05) 100%);
}

[data-theme="dark"] .security-badges {
    background: rgba(0, 212, 170, 0.08);
    border-color: rgba(0, 212, 170, 0.15);
}

/* Light Mode Specific Adjustments */
[data-theme="light"] .form-checkboxes {
    background: rgba(52, 143, 80, 0.05);
    border-color: rgba(52, 143, 80, 0.1);
}

[data-theme="light"] .signup-steps {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(52, 143, 80, 0.03) 100%);
}

[data-theme="light"] .security-badges {
    background: rgba(0, 212, 170, 0.05);
    border-color: rgba(0, 212, 170, 0.1);
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .benefit-icon {
        animation: none;
    }
    
    .step-number {
        transition: none;
    }
    
    .benefit-item {
        transition: none;
    }
}

/* Enhanced accessibility */
.password-toggle[aria-label]:hover::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    z-index: 10;
    pointer-events: none;
}

/* Focus Management */
.form-input:focus + .validation-icon {
    transform: scale(1.1);
}