/* Modern Modal System - DogeGage Chat */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content Container */
.modal-content {
    background: #2a2a2a;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.2;
}

.modal-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e5e5e5;
}

.modal-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.75rem;
}

/* Modal Text */
.modal-content p {
    color: #b8b8b8;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.modal-content p strong {
    color: #e5e5e5;
    font-weight: 600;
}

/* Info Boxes */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-box p {
    color: #93c5fd;
    margin: 0;
    font-size: 0.9375rem;
}

/* Warning Boxes */
.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 3px solid #ef4444;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.warning-box p {
    color: #fca5a5;
    margin: 0;
    font-size: 0.9375rem;
}

/* Password Requirements Box */
.password-requirements {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    font-size: 0.875rem;
    color: #c0c0c0;
    margin-bottom: 0.625rem;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.5;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0.25rem;
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
}

/* Input Groups */
.modal-content .input-group {
    margin-bottom: 1.5rem;
}

.modal-content .input-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: #e5e5e5;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.modal-content input[type="password"],
.modal-content input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(20, 20, 20, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.modal-content input::placeholder {
    color: #666;
}

.modal-content input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(20, 20, 20, 0.9);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.12),
        0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.modal-content input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Error Messages */
.modal-content .error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.625rem;
    min-height: 1.25rem;
    font-weight: 500;
}

/* Modal Actions */
.modal-content .modal-actions {
    display: flex;
    gap: 0.875rem;
    margin-top: 2rem;
}

/* Primary Button */
.modal-content .btn-modal-primary {
    flex: 1;
    padding: 1rem 1.75rem;
    background: #667eea;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-content .btn-modal-primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.modal-content .btn-modal-primary:active:not(:disabled) {
    transform: translateY(0);
}

.modal-content .btn-modal-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.modal-content .btn-modal-secondary {
    flex: 1;
    padding: 1rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e5e5e5;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-content .btn-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.modal-content .btn-modal-secondary:active {
    transform: translateY(0);
}

/* Danger Button */
.modal-content .btn-modal-danger {
    flex: 1;
    padding: 1rem 1.75rem;
    background: #ef4444;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-content .btn-modal-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.modal-content .btn-modal-danger:active {
    transform: translateY(0);
}

/* Password Strength Indicator */
.modal-content .password-strength-indicator {
    margin-top: 0.875rem;
}

.modal-content .strength-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.625rem;
}

.modal-content .strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.modal-content .strength-bar-fill.weak {
    width: 33%;
    background: #ef4444;
}

.modal-content .strength-bar-fill.medium {
    width: 66%;
    background: #f59e0b;
}

.modal-content .strength-bar-fill.strong {
    width: 100%;
    background: #10b981;
}

.modal-content .strength-text {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content .strength-text.weak {
    color: #ef4444;
}

.modal-content .strength-text.medium {
    color: #f59e0b;
}

.modal-content .strength-text.strong {
    color: #10b981;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .modal-content {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content .modal-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .modal-content .btn-modal-primary,
    .modal-content .btn-modal-secondary,
    .modal-content .btn-modal-danger {
        width: 100%;
    }

    .modal-content input[type="password"],
    .modal-content input[type="text"] {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .modal-overlay {
        background: rgba(0, 0, 0, 0.92);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .modal-content input,
    .modal-content button {
        animation: none;
        transition: none;
    }
}
