/* Auth Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
}
.auth-message.info {
  background-color: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #2196f3;
}

.password-toggle-btn:focus {
  outline: 2px solid #2196f3;
  outline-offset: 2px;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.modal-header p {
    color: var(--gray-color);
    font-size: 1rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--gray-color);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Options */
.auth-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}
.auth-message.success {
    color: #4CAF50;
    background-color: #e8f5e9;
}
.auth-message.error {
    color: #f44336;
    background-color: #ffebee;
}
.auth-option {
    margin-bottom: 1.5rem;
}

.auth-option .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-with-icon input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 0.5rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    display: block;
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.terms-agree {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.terms-agree input {
    margin-right: 0.5rem;
}

.terms-agree label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.terms-agree a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-agree a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 5px;
    background-color: var(--light-gray);
    border-radius: 5px;
    margin-bottom: 0.25rem;
    width: 0;
    transition: all 0.3s ease;
}

.strength-bar.weak {
    width: 33%;
    background-color: #f44336;
}

.strength-bar.medium {
    width: 66%;
    background-color: #ffc107;
}

.strength-bar.strong {
    width: 100%;
    background-color: #4CAF50;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.strength-text.weak {
    color: #f44336;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #4CAF50;
}

/* Social Login Styles */
.social-login {
    margin: 2rem 0;
    text-align: center;
}

.social-login p {
    position: relative;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.social-login p::before,
.social-login p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--light-gray);
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--light-gray);
    background-color: white;
    color: var(--dark-color);
    transition: var(--transition);
    width: 100%;
    max-width: 250px;
    font-size: 0.9rem;
}

.btn-social i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.btn-social.google {
    border-color: #db4437;
    color: #db4437;
}

.btn-social.google:hover {
    background-color: #db4437;
    color: white;
    border-color: #db4437;
}

/* Prominent Google Button */
.btn-social.google.prominent {
    background-color: #4285f4;
    border-color: #4285f4;
    color: white;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
    transition: all 0.3s ease;
}

.btn-social.google.prominent:hover {
    background-color: #3367d6;
    border-color: #3367d6;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

.google-logo {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    filter: brightness(0) invert(1);
}

.divider-text {
    text-align: center;
    color: var(--gray-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 0.9rem;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--light-gray);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Loading State */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Back link */
.auth-footer a.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Responsive Styles */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 1.5rem;
    }
    
    .social-login p::before,
    .social-login p::after {
        width: 25%;
    }
    
    .btn-social {
        max-width: 100%;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }

}

/* Fallback options styling */
.auth-fallback-options {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

.auth-fallback-options p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
}

.auth-fallback-options .btn {
    margin: 5px;
    font-size: 0.85em;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-fallback-options .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Network error specific styling */
.auth-message.error .auth-fallback-options {
    border-left-color: #f44336;
    background: #fff5f5;
}

/* Loading states for retry */
.btn[onclick*="retry"] {
    position: relative;
}

.btn[onclick*="retry"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn[onclick*="retry"]:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}