/* Authentication Pages Styles */

body {
    background: linear-gradient(90deg,rgba(36,40,42,1) 0%, rgba(44,41,46,1) 50%, rgba(75,43,50,1) 100%);
    min-height: 100vh;
}

/* Auth Main Container */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

/* Auth Card */
.auth-card {
    background: linear-gradient(180deg, rgba(24,28,35,0.95) 0%, rgba(35,39,51,0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(134,52,52,0.3);
    box-shadow: 0 20px 60px rgba(134,52,52,0.4), 0 10px 30px rgba(0,0,0,0.8);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../image/da479fac12787867e2b629e03138dfcd30aab7f7.png') center/cover no-repeat;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    color: #fff;
    font-size: 2.2em;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 800;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(134,52,52,0.3);
}

.auth-subtitle {
    color: #bfbfbf;
    font-size: 1.1em;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.form-row .form-group {
    flex: 1;
    min-width: 0; /* Prevent flex items from overflowing */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #fff;
    font-size: 0.95em;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

.form-group input {
    background: rgba(45,50,59,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    font-size: 1em;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #863434;
    box-shadow: 0 0 0 3px rgba(134,52,52,0.2);
    background: rgba(45,50,59,0.9);
}

.form-group input::placeholder {
    color: #9aa0b4;
}

/* Password Input */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    width: 100%;
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #9aa0b4;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #fff;
}

/* Input Help Text */
.input-help {
    color: #9aa0b4;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #ff5252;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    color: #9aa0b4;
    font-size: 0.85em;
    min-width: 100px;
    text-align: right;
}

/* Password Strength Colors */
.strength-weak .strength-fill { background: #ff5252; width: 25%; }
.strength-fair .strength-fill { background: #ff9800; width: 50%; }
.strength-good .strength-fill { background: #2196f3; width: 75%; }
.strength-strong .strength-fill { background: #4caf50; width: 100%; }

/* Form Options */
.form-options {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #bfbfbf;
    font-size: 0.95em;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #863434;
    border-color: #863434;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #863434;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.forgot-password:hover {
    color: #a64242;
}

/* Auth Button */
.auth-btn {
    background: linear-gradient(135deg, #863434 0%, #a64242 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.1em;
    font-weight: 700;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(134,52,52,0.3);
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(134,52,52,0.4);
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: #9aa0b4;
    font-size: 0.95em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(45,50,59,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    font-size: 0.95em;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: rgba(45,50,59,0.9);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.google-btn:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 15px rgba(66,133,244,0.2);
}

.github-btn:hover {
    border-color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.apple-btn:hover {
    border-color: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.facebook-btn:hover {
    border-color: #1877F2;
    box-shadow: 0 4px 15px rgba(24,119,242,0.3);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.auth-footer p {
    color: #9aa0b4;
    font-size: 0.95em;
    margin: 0;
}

.auth-link {
    color: #863434;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #a64242;
    text-decoration: underline;
}

/* Error Messages */
.error-message {
    background: rgba(244,67,54,0.1);
    border: 1px solid rgba(244,67,54,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ff6b6b;
    font-size: 0.9em;
    margin-bottom: 16px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Messages */
.success-message {
    background: rgba(76,175,80,0.1);
    border: 1px solid rgba(76,175,80,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #81c784;
    font-size: 0.9em;
    margin-bottom: 16px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Loading State */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-main {
        padding: 20px 16px;
        min-height: calc(100vh - 60px);
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.8em;
    }

    .auth-subtitle {
        font-size: 1em;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .form-row .form-group {
        width: 100%;
        min-width: 0;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .social-login {
        flex-direction: column;
        gap: 8px;
    }

    .social-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 1.6em;
    }

    .form-group input,
    .social-btn,
    .auth-btn {
        padding: 12px 16px;
    }
}

/* Neon Effects for Auth Pages */
.auth-card {
    box-shadow: 0 20px 60px rgba(134,52,52,0.4), 
                0 10px 30px rgba(0,0,0,0.8),
                0 0 40px rgba(134,52,52,0.2);
}

.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(134,52,52,0.2),
                0 0 20px rgba(134,52,52,0.1);
}

.auth-btn {
    box-shadow: 0 8px 25px rgba(134,52,52,0.3),
                0 0 30px rgba(134,52,52,0.2);
}

.auth-btn:hover {
    box-shadow: 0 12px 35px rgba(134,52,52,0.4),
                0 0 40px rgba(134,52,52,0.3);
}

/* Mobile header adjustments for auth pages */
@media (max-width: 768px) {
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1600 !important;
    }
    
    body {
        padding-top: 72px !important;
    }
    
    .auth-main {
        min-height: calc(100vh - 72px);
    }
}

/* Already Logged In Styles */
.already-logged-in {
    width: 100%;
}

.user-info {
    text-align: center;
    margin: 24px 0;
}

.user-avatar {
    margin-bottom: 16px;
}

.user-avatar img {
    border: 3px solid rgba(134,52,52,0.5);
    box-shadow: 0 0 20px rgba(134,52,52,0.3);
}

.auth-actions-logged {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-actions-logged .auth-btn {
    margin: 0;
    transition: all 0.3s ease;
}

.auth-actions-logged .logout-btn:hover {
    background: rgba(255,71,87,1) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255,71,87,0.4),
                0 0 40px rgba(255,71,87,0.3);
}
