/**
 * Memory Management Styles
 */

/* Memory Modal */
.memory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.memory-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.memory-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.memory-modal-header h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.memory-modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
    color: #333;
}

/* Tabs */
.memory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
    background: transparent;
}

.memory-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333 !important;
    transition: all 0.3s ease;
}

.memory-tab:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.05);
}

.memory-tab.active {
    color: #667eea !important;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.memory-tab-content {
    display: none;
    color: #333;
}

.memory-tab-content.active {
    display: block;
}

/* Action Bar */
.memory-actions-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: transparent;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white !important;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333 !important;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff4757;
    color: white !important;
}

.btn-danger:hover {
    background: #ee5a6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

/* Memories List */
.memories-container {
    min-height: 400px;
    background: transparent;
    color: #333;
}

.memories-list {
    background: transparent;
}

.no-memories {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-memories i {
    font-size: 64px;
    margin-bottom: 16px;
    color: #ddd;
}

.no-memories p {
    font-size: 16px;
    margin: 0;
    color: #666;
}

.memory-category {
    margin-bottom: 32px;
}

.memory-category h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea !important;
    margin-bottom: 16px;
    font-size: 18px;
}

.memory-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.memory-item:hover {
    background: #f0f1f5;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.memory-content {
    flex: 1;
}

.memory-text {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.memory-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

.memory-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.memory-confidence {
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    color: #667eea;
    font-weight: 500;
}

.memory-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: white;
    border: 1px solid #e0e0e0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.btn-icon.btn-danger:hover {
    background: #ff4757;
    border-color: #ff4757;
}

/* Statistics */
.memory-stats-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-card i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.storage-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.storage-info p {
    margin: 0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Settings */
.memory-settings {
    max-width: 600px;
}

.setting-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.setting-description {
    margin: 8px 0 0 32px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Notifications */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification i {
    font-size: 20px;
}

.notification-success {
    border-left: 4px solid #2ecc71;
}

.notification-success i {
    color: #2ecc71;
}

.notification-error {
    border-left: 4px solid #ff4757;
}

.notification-error i {
    color: #ff4757;
}

.notification-info {
    border-left: 4px solid #667eea;
}

.notification-info i {
    color: #667eea;
}

.notification.fade-out {
    animation: slideOut 0.3s ease;
}

.feedback-confirmation {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #667eea;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea !important;
    font-size: 16px;
}

.loading i {
    margin-right: 8px;
    color: #667eea;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .memory-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .memory-modal-header {
        padding: 16px 20px;
    }
    
    .memory-modal-header h2 {
        font-size: 20px;
    }
    
    .memory-modal-body {
        padding: 16px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-actions-bar {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .memory-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .memory-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
