/* 网站收藏夹页面样式 */

/* 修复下拉框文字颜色 */
#categoryFilter,
#pageSizeSelect {
    color: #495057 !important;
    background-color: white !important;
}

#categoryFilter option,
#pageSizeSelect option {
    color: #495057 !important;
    background-color: white !important;
}

.bookmarks-container {
    margin-top: 20px;
}

.bookmarks-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bookmark-category {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.category-count {
    font-size: 14px;
    font-weight: normal;
    color: #667eea;
    margin-left: 8px;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
}

.bookmark-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.bookmark-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.bookmark-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bookmark-title {
    flex: 1;
}

.bookmark-link {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bookmark-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.bookmark-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.action-btn.copy {
    color: #667eea;
}

.action-btn.edit {
    color: #28a745;
}

.action-btn.delete {
    color: #dc3545;
}

.bookmark-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bookmark-url {
    font-size: 13px;
    color: #6c757d;
    word-break: break-all;
}

.bookmark-credential {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

.credential-label {
    font-weight: bold;
    color: #495057;
    min-width: 50px;
}

.credential-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}

.credential-value.password-masked {
    font-family: monospace;
    letter-spacing: 2px;
}

.btn-copy-small,
.btn-show-password {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 5px;
    transition: transform 0.2s ease;
}

.btn-copy-small:hover,
.btn-show-password:hover {
    transform: scale(1.2);
}

.bookmark-notes {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

/* 表单样式增强 */
.input-with-button {
    display: flex;
    gap: 5px;
    align-items: center;
}

.input-with-button input {
    flex: 1;
}

.btn-copy,
.btn-toggle-password {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn-copy:hover,
.btn-toggle-password:hover {
    background: #5568d3;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
}

/* 自定义确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

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

.confirm-dialog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    animation: slideDown 0.3s ease;
}

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

.confirm-dialog-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e9ecef;
}

.confirm-dialog-icon {
    font-size: 32px;
    line-height: 1;
}

.confirm-dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.confirm-dialog-body {
    padding: 24px;
}

.confirm-dialog-message {
    margin: 0;
    font-size: 16px;
    color: #495057;
    line-height: 1.6;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.confirm-dialog-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-dialog-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.confirm-dialog-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-dialog-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* 修改密码模态框样式 */
.password-modal {
    max-width: 500px;
    margin-top: 120px;
}

.password-modal .form-group {
    margin-bottom: 25px;
}

.password-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.password-modal .label-icon {
    font-size: 1.1em;
}

.password-modal .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s;
    background: #f9f9f9;
}

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

.password-modal .form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #999;
}

.password-modal .error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #e74c3c;
    font-size: 0.9em;
}

.password-modal .modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.password-modal .modal-footer button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1em;
}

.password-modal .modal-footer .btn-secondary {
    background: #95a5a6;
}

.password-modal .modal-footer .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.password-modal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.password-modal .modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.password-modal .modal-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bookmark-items {
        grid-template-columns: 1fr;
    }
    
    .bookmark-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bookmark-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .confirm-dialog-content {
        width: 95%;
        max-width: none;
    }

    .confirm-dialog-footer {
        flex-direction: column-reverse;
    }

    .confirm-dialog-cancel,
    .confirm-dialog-confirm {
        width: 100%;
    }

    .password-modal .modal-footer {
        flex-direction: column;
    }

    .password-modal .modal-footer button {
        width: 100%;
    }
}

