/* Authentication Modal Styles */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    pointer-events: all;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.auth-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.98) 0%, rgba(30, 30, 50, 0.98) 100%);
    border-radius: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Header */
.auth-modal-header {
    text-align: center;
    padding: 40px 40px 30px;
}

.auth-logo {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-modal-header h2 {
    color: white;
    font-size: 2em;
    margin: 0 0 10px;
    font-weight: 700;
}

.auth-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1em;
    margin: 0;
}

/* Body */
.auth-modal-body {
    padding: 0 40px 30px;
}

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

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

.form-group label {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.form-group input {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

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

.form-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

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

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 10px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.auth-divider span {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.98) 0%, rgba(30, 30, 50, 0.98) 100%);
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
}

/* Social Auth */
.social-auth {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.social-btn.google:hover {
    border-color: #4285F4;
}

.social-btn.github:hover {
    border-color: #333;
}

/* Footer */
.auth-modal-footer {
    text-align: center;
    padding: 20px 40px 40px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-modal-footer a:hover {
    text-decoration: underline;
}

/* Back to sign in */
.back-to-signin {
    text-align: center;
    margin-top: 20px;
}

.back-to-signin a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95em;
}

.back-to-signin a:hover {
    text-decoration: underline;
}

/* Error and Success Messages */
.auth-error,
.auth-success {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95em;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.auth-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #69f0ae;
}

/* Loading State */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .auth-modal-header,
    .auth-modal-body,
    .auth-modal-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .auth-logo {
        font-size: 3em;
    }

    .auth-modal-header h2 {
        font-size: 1.6em;
    }

    .social-auth {
        flex-direction: column;
    }

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

/* Smooth Scrollbar */
.auth-modal-content::-webkit-scrollbar {
    width: 8px;
}

.auth-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.auth-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.auth-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
